Skip to content
  1. May 19, 2023
  2. May 18, 2023
  3. May 17, 2023
    • Krzysztof Kozlowski's avatar
      dt-bindings: net: nxp,sja1105: document spi-cpol/cpha · af2eab1a
      Krzysztof Kozlowski authored
      
      
      Some boards use SJA1105 Ethernet Switch with SPI CPHA, while ones with
      SJA1110 use SPI CPOL, so document this to fix dtbs_check warnings:
      
        arch/arm64/boot/dts/freescale/fsl-lx2160a-bluebox3.dtb: ethernet-switch@0: Unevaluated properties are not allowed ('spi-cpol' was unexpected)
      
      Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
      Reviewed-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      af2eab1a
    • Jaco Kroon's avatar
      net/pppoe: make number of hash bits configurable · 96ba44c6
      Jaco Kroon authored
      
      
      When running large numbers of pppoe connections, a bucket size of 16 may
      be too small and 256 may be more appropriate.  This sacrifices some RAM
      but should result in faster processing of incoming PPPoE frames.
      
      On our systems we run upwards of 150 PPPoE connections at any point in
      time, and we suspect we're starting to see the effects of this small
      number of buckets.
      
      The legal values according to pppoe.c is anything that when 8 is divided
      by that results in a modulo of 0, ie, 1, 2, 4 and 8.
      
      The size of the per-underlying-interface structure is:
      
      sizeof(rwlock_t) + sizeof(pppox_sock*) * PPPOE_HASH_SIZE.
      
      Assuming a 64-bit pointer this will result in just over a 2KiB structure
      for PPPOE_HASH_BITS=8, which will likely result in a 4KiB allocation,
      which for us at least is acceptable.
      
      Not sure what the minimum allocation size is, and thus if values of 1
      and 2 truly make sense.  Default results in historic sizing and
      behaviour.
      
      Signed-off-by: default avatarJaco Kroon <jaco@uls.co.za>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      96ba44c6
    • David S. Miller's avatar
      Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue · c83ae452
      David S. Miller authored
      
      
      Tony Nguyen says:
      
      ====================
      ice: support dynamic interrupt allocation
      
      Piotr Raczynski says:
      
      This patchset reimplements MSIX interrupt allocation logic to allow dynamic
      interrupt allocation after MSIX has been initially enabled. This allows
      current and future features to allocate and free interrupts as needed and
      will help to drastically decrease number of initially preallocated
      interrupts (even down to the API hard limit of 1). Although this patchset
      does not change behavior in terms of actual number of allocated interrupts
      during probe, it will be subject to change.
      
      First few patches prepares to introduce dynamic allocation by moving
      interrupt allocation code to separate file and update allocation API used
      in the driver to the currently preferred one.
      
      Due to the current contract between ice and irdma driver which is directly
      accessing msix entries allocated by ice driver, even after moving away from
      older pci_enable_msix_range function, still keep msix_entries array for
      irdma use.
      
      Next patches refactors and removes redundant code from SRIOV related logic
      as it also make it easier to move away from static allocation scheme.
      
      Last patches actually enables dynamic allocation of MSIX interrupts. First,
      introduce functions to allocate and free interrupts individually. This sets
      ground for the rest of the changes even if that patch still allocates the
      interrupts from the preallocated pool. Since this patch starts to keep
      interrupt details in ice_q_vector structure we can get rid of functions
      that calculates base vector number and register offset for the interrupt
      as it is equal to the interrupt index. Only keep separate register offset
      functions for the VF VSIs.
      
      Next, replace homegrown interrupt tracker with much simpler xarray based
      approach. As new API always allocate interrupts one by one, also track
      interrupts in the same manner.
      
      Lastly, extend the interrupt tracker to deal both with preallocated and
      dynamically allocated vectors and use pci_msix_alloc_irq_at and
      pci_msix_free_irq functions. Since not all architecture supports dynamic
      allocation, check it before trying to allocate a new interrupt.
      
      As previously mentioned, this patchset does not change number of initially
      allocated interrupts during init phase but now it can and will likely be
      changed.
      
      Patch 1-3 -> move code around and use newer API
      Patch 4-5 -> refactor and remove redundant SRIOV code
      Patch 6   -> allocate every interrupt individually
      Patch 7   -> replace homegrown interrupt tracker with xarray
      Patch 8   -> allow dynamic interrupt allocation
      ---
      v2:
      Patch 4
       - simplify ice_vsi_setup_vector_base and account for num_avail_sw_msix
      Patch 8
       - prevent q_vector leak in case vf ctrl VSI error
      
      v1: https://lore.kernel.org/netdev/20230509170048.2235678-1-anthony.l.nguyen@intel.com/
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c83ae452
    • Subbaraya Sundeep's avatar
      octeontx2-pf: mcs: Support VLAN in clear text · 030d71fd
      Subbaraya Sundeep authored
      
      
      Detect whether macsec secy is running on top of VLAN
      which implies transmitting VLAN tag in clear text before
      macsec SecTag. In this case configure hardware to insert
      SecTag after VLAN tag.
      
      Signed-off-by: default avatarSubbaraya Sundeep <sbhatta@marvell.com>
      Signed-off-by: default avatarSunil Kovvuri Goutham <sgoutham@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      030d71fd
    • Yuya Tajima's avatar
      seg6: Cleanup duplicates of skb_dst_drop calls · fa0583c2
      Yuya Tajima authored
      
      
      In processing IPv6 segment routing header (SRH), several functions call
      skb_dst_drop before ip6_route_input. However, ip6_route_input calls
      skb_dst_drop within it, so there is no need to call skb_dst_drop in advance.
      
      Signed-off-by: default avatarYuya Tajima <yuya.tajimaa@gmail.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fa0583c2
    • David S. Miller's avatar
      Merge branch 'tcp-io_uring-zc-opts' · 81cf1ade
      David S. Miller authored
      
      
      Merge branch 'tcp-io_uring-zc-opts'
      
      Pavel Begunkov says:
      
      ====================
      minor tcp io_uring zc optimisations
      
      Patch 1 is a simple cleanup, patch 2 gives removes 2 atomics from the
      io_uring zc TCP submission path, which yielded extra 0.5% for my
      throughput CPU bound tests based on liburing/examples/send-zerocopy.c
      ====================
      
      Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      81cf1ade
    • Pavel Begunkov's avatar
      net/tcp: optimise io_uring zc ubuf refcounting · a7533584
      Pavel Begunkov authored
      
      
      io_uring keeps a reference to ubuf_info during submission, so if
      tcp_sendmsg_locked() sees msghdr::msg_ubuf in can be sure the buffer
      will be kept alive and doesn't need to additionally pin it.
      
      Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a7533584
    • Pavel Begunkov's avatar
      net/tcp: don't peek at tail for io_uring zc · eea96a3e
      Pavel Begunkov authored
      
      
      Move tcp_write_queue_tail() to SOCK_ZEROCOPY specific flag as zerocopy
      setup for msghdr->ubuf_info doesn't need to peek into the last request.
      
      Signed-off-by: default avatarPavel Begunkov <asml.silence@gmail.com>
      Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
      Reviewed-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eea96a3e
    • Jakub Kicinski's avatar
      Merge tag 'linux-can-next-for-6.5-20230515' of... · 833e24ae
      Jakub Kicinski authored
      
      Merge tag 'linux-can-next-for-6.5-20230515' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next
      
      Marc Kleine-Budde says:
      
      ====================
      pull-request: can-next 2023-05-15
      
      The 1st patch is by Ji-Ze Hong and adds support for the Fintek F81604
      USB-CAN adapter.
      
      Jiapeng Chong's patch removes unnecessary dev_err() functions from the
      bxcan driver.
      
      The next patch is by me an makes a CAN internal header file self
      contained.
      
      The remaining 19 patches are by Uwe Kleine-König, they all convert the
      platform driver remove callback to return void.
      
      * tag 'linux-can-next-for-6.5-20230515' of git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next: (22 commits)
        can: xilinx: Convert to platform remove callback returning void
        can: ti_hecc: Convert to platform remove callback returning void
        can: sun4i_can: Convert to platform remove callback returning void
        can: softing: Convert to platform remove callback returning void
        can: sja1000_platform: Convert to platform remove callback returning void
        can: sja1000_isa: Convert to platform remove callback returning void
        can: rcar: Convert to platform remove callback returning void
        can: mscan: mpc5xxx_can: Convert to platform remove callback returning void
        can: m_can: Convert to platform remove callback returning void
        can: janz-ican3: Convert to platform remove callback returning void
        can: ifi_canfd: Convert to platform remove callback returning void
        can: grcan: Convert to platform remove callback returning void
        can: flexcan: Convert to platform remove callback returning void
        can: ctucanfd: Convert to platform remove callback returning void
        can: length: make header self contained
        can: cc770_platform: Convert to platform remove callback returning void
        can: bxcan: Remove unnecessary print function dev_err()
        can: cc770_isa: Convert to platform remove callback returning void
        can: usb: f81604: add Fintek F81604 support
        can: c_can: Convert to platform remove callback returning void
        ...
      ====================
      
      Link: https://lore.kernel.org/r/20230515205759.1003118-1-mkl@pengutronix.de
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      833e24ae
    • Jakub Kicinski's avatar
      Revert "net: Remove low_thresh in ip defrag" · e7480a44
      Jakub Kicinski authored
      This reverts commit b2cbac9b
      
      .
      
      We have multiple reports of obvious breakage from this patch.
      
      Reported-by: default avatarIdo Schimmel <idosch@idosch.org>
      Link: https://lore.kernel.org/all/ZGIRWjNcfqI8yY8W@shredder/
      Link: https://lore.kernel.org/all/CADJHv_sDK=0RrMA2FTZQV5fw7UQ+qY=HG21Wu5qb0V9vvx5w6A@mail.gmail.com/
      Reported-by: default avatar <syzbot+a5e719ac7c268e414c95@syzkaller.appspotmail.com>
      Reported-by: default avatar <syzbot+a03fd670838d927d9cd8@syzkaller.appspotmail.com>
      Fixes: b2cbac9b
      
       ("net: Remove low_thresh in ip defrag")
      Link: https://lore.kernel.org/r/20230517034112.1261835-1-kuba@kernel.org
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      e7480a44
    • Jakub Kicinski's avatar
      Merge tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next · a0e35a64
      Jakub Kicinski authored
      
      
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf-next 2023-05-16
      
      We've added 57 non-merge commits during the last 19 day(s) which contain
      a total of 63 files changed, 3293 insertions(+), 690 deletions(-).
      
      The main changes are:
      
      1) Add precision propagation to verifier for subprogs and callbacks,
         from Andrii Nakryiko.
      
      2) Improve BPF's {g,s}setsockopt() handling with wrong option lengths,
         from Stanislav Fomichev.
      
      3) Utilize pahole v1.25 for the kernel's BTF generation to filter out
         inconsistent function prototypes, from Alan Maguire.
      
      4) Various dyn-pointer verifier improvements to relax restrictions,
         from Daniel Rosenberg.
      
      5) Add a new bpf_task_under_cgroup() kfunc for designated task,
         from Feng Zhou.
      
      6) Unblock tests for arm64 BPF CI after ftrace supporting direct call,
         from Florent Revest.
      
      7) Add XDP hint kfunc metadata for RX hash/timestamp for igc,
         from Jesper Dangaard Brouer.
      
      8) Add several new dyn-pointer kfuncs to ease their usability,
         from Joanne Koong.
      
      9) Add in-depth LRU internals description and dot function graph,
         from Joe Stringer.
      
      10) Fix KCSAN report on bpf_lru_list when accessing node->ref,
          from Martin KaFai Lau.
      
      11) Only dump unprivileged_bpf_disabled log warning upon write,
          from Kui-Feng Lee.
      
      12) Extend test_progs to directly passing allow/denylist file,
          from Stephen Veiss.
      
      13) Fix BPF trampoline memleak upon failure attaching to fentry,
          from Yafang Shao.
      
      14) Fix emitting struct bpf_tcp_sock type in vmlinux BTF,
          from Yonghong Song.
      
      * tag 'for-netdev' of https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next: (57 commits)
        bpf: Fix memleak due to fentry attach failure
        bpf: Remove bpf trampoline selector
        bpf, arm64: Support struct arguments in the BPF trampoline
        bpftool: JIT limited misreported as negative value on aarch64
        bpf: fix calculation of subseq_idx during precision backtracking
        bpf: Remove anonymous union in bpf_kfunc_call_arg_meta
        bpf: Document EFAULT changes for sockopt
        selftests/bpf: Correctly handle optlen > 4096
        selftests/bpf: Update EFAULT {g,s}etsockopt selftests
        bpf: Don't EFAULT for {g,s}setsockopt with wrong optlen
        libbpf: fix offsetof() and container_of() to work with CO-RE
        bpf: Address KCSAN report on bpf_lru_list
        bpf: Add --skip_encoding_btf_inconsistent_proto, --btf_gen_optimized to pahole flags for v1.25
        selftests/bpf: Accept mem from dynptr in helper funcs
        bpf: verifier: Accept dynptr mem as mem in helpers
        selftests/bpf: Check overflow in optional buffer
        selftests/bpf: Test allowing NULL buffer in dynptr slice
        bpf: Allow NULL buffers in bpf_dynptr_slice(_rw)
        selftests/bpf: Add testcase for bpf_task_under_cgroup
        bpf: Add bpf_task_under_cgroup() kfunc
        ...
      ====================
      
      Link: https://lore.kernel.org/r/20230515225603.27027-1-daniel@iogearbox.net
      Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
      a0e35a64
    • Piotr Raczynski's avatar
      ice: add dynamic interrupt allocation · 011670cc
      Piotr Raczynski authored
      
      
      Currently driver can only allocate interrupt vectors during init phase by
      calling pci_alloc_irq_vectors. Change that and make use of new
      pci_msix_alloc_irq_at/pci_msix_free_irq API and enable to allocate and free
      more interrupts after MSIX has been enabled. Since not all platforms
      supports dynamic allocation, check it with pci_msix_can_alloc_dyn.
      
      Extend the tracker to keep track how many interrupts are allocated
      initially so when all such vectors are already used, additional interrupts
      are automatically allocated dynamically. Remember each interrupt allocation
      method to then free appropriately. Since some features may require
      interrupts allocated dynamically add appropriate VSI flag and take it into
      account when allocating new interrupt.
      
      Reviewed-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarPiotr Raczynski <piotr.raczynski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      011670cc
    • Piotr Raczynski's avatar
      ice: track interrupt vectors with xarray · cfebc0a3
      Piotr Raczynski authored
      
      
      Replace custom interrupt tracker with generic xarray data structure.
      Remove all code responsible for searching for a new entry with xa_alloc,
      which always tries to allocate at the lowes possible index. As a result
      driver is always using a contiguous region of the MSIX vector table.
      
      New tracker keeps ice_irq_entry entries in xarray as opaque for the rest
      of the driver hiding the entry details from the caller.
      
      Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Reviewed-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarPiotr Raczynski <piotr.raczynski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      cfebc0a3
    • Piotr Raczynski's avatar
      ice: add individual interrupt allocation · 4aad5335
      Piotr Raczynski authored
      
      
      Currently interrupt allocations, depending on a feature are distributed
      in batches. Also, after allocation there is a series of operations that
      distributes per irq settings through that batch of interrupts.
      
      Although driver does not yet support dynamic interrupt allocation, keep
      allocated interrupts in a pool and add allocation abstraction logic to
      make code more flexible. Keep per interrupt information in the
      ice_q_vector structure, which yields ice_vsi::base_vector redundant.
      Also, as a result there are a few functions that can be removed.
      
      Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Reviewed-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarPiotr Raczynski <piotr.raczynski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      4aad5335
    • Piotr Raczynski's avatar
      ice: remove redundant SRIOV code · 524012c6
      Piotr Raczynski authored
      
      
      Remove redundant code from ice_get_max_valid_res_idx that has no effect.
      ice_pf::irq_tracker is initialized during driver probe, there is no reason
      to check it again. Also it is not possible for pf::sriov_base_vector to be
      lower than the tracker length, remove WARN_ON that will never happen.
      
      Get rid of ice_get_max_valid_res_idx helper function completely since it
      can never return negative value.
      
      Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Reviewed-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Tested-by: default avatarRafal Romanowski <rafal.romanowski@intel.com>
      Signed-off-by: default avatarPiotr Raczynski <piotr.raczynski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      524012c6
    • Piotr Raczynski's avatar
      ice: refactor VF control VSI interrupt handling · 369bb5a2
      Piotr Raczynski authored
      
      
      All VF control VSIs share the same interrupt vector. Currently, a helper
      function dedicated for that directly sets ice_vsi::base_vector.
      
      Use helper that returns pointer to first found VF control VSI instead.
      
      Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Tested-by: default avatarRafal Romanowski <rafal.romanowski@intel.com>
      Signed-off-by: default avatarPiotr Raczynski <piotr.raczynski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      369bb5a2
    • Piotr Raczynski's avatar
      ice: use preferred MSIX allocation api · 05018936
      Piotr Raczynski authored
      
      
      Move away from using pci_enable_msix_range/pci_disable_msix and use
      pci_alloc_irq_vectors/pci_free_irq_vectors instead.
      
      As a result stop tracking msix_entries since with newer API entries are
      handled by MSIX core. However, due to current design of communication
      with RDMA driver which accesses ice_pf::msix_entries directly, keep
      using the array just for RDMA driver use.
      
      Reviewed-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarPiotr Raczynski <piotr.raczynski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      05018936
    • Piotr Raczynski's avatar
      ice: use pci_irq_vector helper function · afe87cfe
      Piotr Raczynski authored
      
      
      Currently, driver gets interrupt number directly from ice_pf::msix_entries
      array. Use helper function dedicated to do just that.
      
      While at it use a variable to store interrupt number in
      ice_free_irq_msix_misc instead of calling the helper function twice.
      
      Reviewed-by: default avatarMichal Swiatkowski <michal.swiatkowski@linux.intel.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarPiotr Raczynski <piotr.raczynski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      afe87cfe
    • Piotr Raczynski's avatar
      ice: move interrupt related code to separate file · 38e97a98
      Piotr Raczynski authored
      
      
      Keep interrupt handling code in a dedicated file. This helps keep driver
      structured better and prepares for more functionality added to this file.
      
      Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Reviewed-by: default avatarSimon Horman <simon.horman@corigine.com>
      Tested-by: Pucha Himasekhar Reddy <himasekharx.reddy.pucha@intel.com> (A Contingent worker at Intel)
      Signed-off-by: default avatarPiotr Raczynski <piotr.raczynski@intel.com>
      Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
      38e97a98
  4. May 16, 2023