1. 04 Sep, 2020 13 commits
  2. 02 Sep, 2020 6 commits
  3. 01 Sep, 2020 15 commits
  4. 31 Aug, 2020 6 commits
    • Alexei Starovoitov's avatar
      bpf: Remove bpf_lsm_file_mprotect from sleepable list. · f56407fa
      Alexei Starovoitov authored
      Technically the bpf programs can sleep while attached to bpf_lsm_file_mprotect,
      but such programs need to access user memory. So they're in might_fault()
      category. Which means they cannot be called from file_mprotect lsm hook that
      takes write lock on mm->mmap_lock.
      Adjust the test accordingly.
      
      Also add might_fault() to __bpf_prog_enter_sleepable() to catch such deadlocks early.
      
      Fixes: 1e6c62a8 ("bpf: Introduce sleepable BPF programs")
      Fixes: e68a1445 ("selftests/bpf: Add sleepable tests")
      Reported-by: default avatarYonghong Song <yhs@fb.com>
      Signed-off-by: default avatarAlexei Starovoitov <ast@kernel.org>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Link: https://lore.kernel.org/bpf/20200831201651.82447-1-alexei.starovoitov@gmail.com
      f56407fa
    • Weqaar Janjua's avatar
      samples/bpf: Fix to xdpsock to avoid recycling frames · b69e56cf
      Weqaar Janjua authored
      The txpush program in the xdpsock sample application is supposed
      to send out all packets in the umem in a round-robin fashion.
      The problem is that it only cycled through the first BATCH_SIZE
      worth of packets. Fixed this so that it cycles through all buffers
      in the umem as intended.
      
      Fixes: 248c7f9c ("samples/bpf: convert xdpsock to use libbpf for AF_XDP access")
      Signed-off-by: default avatarWeqaar Janjua <weqaar.a.janjua@intel.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: default avatarBjörn Töpel <bjorn.topel@intel.com>
      Link: https://lore.kernel.org/bpf/20200828161717.42705-1-weqaar.a.janjua@intel.com
      b69e56cf
    • Magnus Karlsson's avatar
      samples/bpf: Optimize l2fwd performance in xdpsock · c8a039a4
      Magnus Karlsson authored
      Optimize the throughput performance of the l2fwd sub-app in the
      xdpsock sample application by removing a duplicate syscall and
      increasing the size of the fill ring.
      
      The latter needs some further explanation. We recommend that you set
      the fill ring size >= HW RX ring size + AF_XDP RX ring size. Make sure
      you fill up the fill ring with buffers at regular intervals, and you
      will with this setting avoid allocation failures in the driver. These
      are usually quite expensive since drivers have not been written to
      assume that allocation failures are common. For regular sockets,
      kernel allocated memory is used that only runs out in OOM situations
      that should be rare.
      
      These two performance optimizations together lead to a 6% percent
      improvement for the l2fwd app on my machine.
      Signed-off-by: default avatarMagnus Karlsson <magnus.karlsson@intel.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      Link: https://lore.kernel.org/bpf/1598619065-1944-1-git-send-email-magnus.karlsson@intel.com
      c8a039a4
    • Miaohe Lin's avatar
      net: ipv4: remove unused arg exact_dif in compute_score · 34e1ec31
      Miaohe Lin authored
      The arg exact_dif is not used anymore, remove it. inet_exact_dif_match()
      is no longer needed after the above is removed, so remove it too.
      Signed-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      34e1ec31
    • Miaohe Lin's avatar
      net: ipv6: remove unused arg exact_dif in compute_score · 3f7d820b
      Miaohe Lin authored
      The arg exact_dif is not used anymore, remove it. inet6_exact_dif_match()
      is no longer needed after the above is removed, remove it too.
      Signed-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3f7d820b
    • David S. Miller's avatar
      Merge branch 'net-phy-add-Lynx-PCS-MDIO-module' · 10eb4667
      David S. Miller authored
      Ioana Ciornei says:
      
      ====================
      net: phy: add Lynx PCS MDIO module
      
      Add support for the Lynx PCS as a separate module in drivers/net/phy/.
      The advantage of this structure is that multiple ethernet or switch
      drivers used on NXP hardware (ENETC, Seville, Felix DSA switch etc) can
      share the same implementation of PCS configuration and runtime
      management.
      
      The module implements phylink_pcs_ops and exports a phylink_pcs
      (incorporated into a lynx_pcs) which can be directly passed to phylink
      through phylink_pcs_set.
      
      The first 3 patches add some missing pieces in phylink and the locked
      mdiobus write accessor. Next, the Lynx PCS MDIO module is added as a
      standalone module. The majority of the code is extracted from the Felix
      DSA driver. The last patch makes the necessary changes in the Felix and
      Seville drivers in order to use the new common PCS implementation.
      
      At the moment, USXGMII (only with in-band AN), SGMII, QSGMII (with and
      without in-band AN) and 2500Base-X (only w/o in-band AN) are supported
      by the Lynx PCS MDIO module since these were also supported by Felix and
      no functional change is intended at this time.
      
      Changes in v2:
       * got rid of the mdio_lynx_pcs structure and directly exported the
       functions without the need of an indirection
       * made the necessary adjustments for this in the Felix DSA driver
       * solved the broken allmodconfig build test by making the module
       tristate instead of bool
       * fixed a memory leakage in the Felix driver (the pcs structure was
       allocated twice)
      
      Changes in v3:
       * added support for PHYLINK PCS ops in DSA (patch 5/9)
       * cleanup in Felix PHYLINK operations and migrate to
       phylink_mac_link_up() being the callback of choice for applying MAC
       configuration (patches 6-8)
      
      Changes in v4:
       * use the newly introduced phylink PCS mechanism
       * install the phylink_pcs in the phylink_mac_config DSA ops
       * remove the direct implementations of the PCS ops
       * do no use the SGMII_ prefix when referring to the IF_MORE register
       * add a phylink helper to decode the USXGMII code word
       * remove cleanup patches for Felix (these have been already accepted)
       * Seville (recently introduced) now has PCS support through the same
       Lynx PCS module
      
      Changes in v5:
       - move the pcs-lynx driver to drivers/net/pcs
       - reword the commit message a bit in 4/5
       - add error checking and error propagation in 4/5
       - s/IF_MODE_DUPLEX/IF_MODE_HALF_DUPLEX in 4/5
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      10eb4667