1. 06 Apr, 2021 12 commits
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 5106efe6
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following batch contains Netfilter/IPVS updates for your net-next tree:
      
      1) Simplify log infrastructure modularity: Merge ipv4, ipv6, bridge,
         netdev and ARP families to nf_log_syslog.c. Add module softdeps.
         This fixes a rare deadlock condition that might occur when log
         module autoload is required. From Florian Westphal.
      
      2) Moves part of netfilter related pernet data from struct net to
         net_generic() infrastructure. All of these users can be modules,
         so if they are not loaded there is no need to waste space. Size
         reduction is 7 cachelines on x86_64, also from Florian.
      
      2) Update nftables audit support to report events once per table,
         to get it aligned with iptables. From Richard Guy Briggs.
      
      3) Check for stale routes from the flowtable garbage collector path.
         This is fixing IPv6 which breaks due missing check for the dst_cookie.
      
      4) Add a nfnl_fill_hdr() function to simplify netlink + nfnetlink
         headers setup.
      
      5) Remove documentation on several statified functions.
      
      6) Remove printk on netns creation for the FTP IPVS tracker,
         from Florian Westphal.
      
      7) Remove unnecessary nf_tables_destroy_list_lock spinlock
         initialization, from Yang Yingliang.
      
      7) Remove a duplicated forward declaration in ipset,
         from Wan Jiabing.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5106efe6
    • Andy Shevchenko's avatar
      time64.h: Consolidated PSEC_PER_SEC definition · a460513e
      Andy Shevchenko authored
      We have currently three users of the PSEC_PER_SEC each of them defining it
      individually. Instead, move it to time64.h to be available for everyone.
      
      There is a new user coming with the same constant in use. It will also
      make its life easier.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Acked-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a460513e
    • Andy Shevchenko's avatar
      stmmac: intel: Drop duplicate ID in the list of PCI device IDs · 3036ec03
      Andy Shevchenko authored
      The PCI device IDs are defined with a prefix PCI_DEVICE_ID.
      There is no need to repeat the ID part at the end of each definition.
      Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
      Reviewed-by: default avatarWong Vee Khee <vee.khee.wong@linux.intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3036ec03
    • Qiheng Lin's avatar
      netdevsim: remove unneeded semicolon · be107538
      Qiheng Lin authored
      Eliminate the following coccicheck warning:
       drivers/net/netdevsim/fib.c:569:2-3: Unneeded semicolon
      Signed-off-by: default avatarQiheng Lin <linqiheng@huawei.com>
      Acked-by: default avatarJakub Kicinski <kuba@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      be107538
    • Qiheng Lin's avatar
      net: ethernet: mtk_eth_soc: remove unneeded semicolon · 3b2c32f9
      Qiheng Lin authored
      Eliminate the following coccicheck warning:
       drivers/net/ethernet/mediatek/mtk_ppe.c:270:2-3: Unneeded semicolon
      Signed-off-by: default avatarQiheng Lin <linqiheng@huawei.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3b2c32f9
    • wengjianfeng's avatar
      nfc: s3fwrn5: remove unnecessary label · b58c4649
      wengjianfeng authored
      In function s3fwrn5_nci_post_setup, the variable ret is assigned then
      goto out label, which just return ret, so we use return to replace it.
      Other goto sentences are similar, we use return sentences to replace
      goto sentences and delete out label.
      Signed-off-by: default avatarwengjianfeng <wengjianfeng@yulong.com>
      Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b58c4649
    • David S. Miller's avatar
      Merge branch 'usbnet-speed' · b3feb439
      David S. Miller authored
      Grant Grundler says:
      
      ====================
      usbnet: speed reporting for devices without MDIO
      
      This series introduces support for USB network devices that report
      speed as a part of their protocol, not emulating an MII to be accessed
      over MDIO.
      
      v2: rebased on recent upstream changes
      v3: incorporated hints on naming and comments
      v4: fix misplaced hunks; reword some commit messages;
          add same change for cdc_ether
      v4-repost: added "net-next" to subject and Andrew Lunn's Reviewed-by
      
      I'm reposting Oliver Neukum's <oneukum@suse.com> patch series with
      fix ups for "misplaced hunks" (landed in the wrong patches).
      Please fixup the "author" if "git am" fails to attribute the
      patches 1-3 (of 4) to Oliver.
      
      I've tested v4 series with "5.12-rc3+" kernel on Intel NUC6i5SYB
      and + Sabrent NT-S25G. Google Pixelbook Go (chromeos-4.4 kernel)
      + Alpha Network AUE2500C were connected directly to the NT-S25G
      to get 2.5Gbps link rate:
      Settings for enx002427880815:
              Supported ports: [  ]
              Supported link modes:   Not reported
              Supported pause frame use: No
              Supports auto-negotiation: No
              Supported FEC modes: Not reported
              Advertised link modes:  Not reported
              Advertised pause frame use: No
              Advertised auto-negotiation: No
              Advertised FEC modes: Not reported
              Speed: 2500Mb/s
              Duplex: Half
              Auto-negotiation: off
              Port: Twisted Pair
              PHYAD: 0
              Transceiver: internal
              MDI-X: Unknown
              Current message level: 0x00000007 (7)
                                     drv probe link
              Link detected: yes
      
      "Duplex" is a lie since we get no information about it.
      
      I expect "Auto-Negotiation" is always true for cdc_ncm and
      cdc_ether devices and perhaps someone knows offhand how
      to have ethtool report "true" instead.
      
      But this is good step in the right direction.
      
      base-commit: 1c273e10
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b3feb439
    • Grant Grundler's avatar
      net: cdc_ether: record speed in status method · d42ebcbb
      Grant Grundler authored
      Until very recently, the usbnet framework only had support functions
      for devices which reported the link speed by explicitly querying the
      PHY over a MDIO interface. However, the cdc_ether devices send
      notifications when the link state or link speeds change and do not
      expose the PHY (or modem) directly.
      
      Support funtions (e.g. usbnet_get_link_ksettings_internal()) to directly
      query state recorded by the cdc_ether driver were added in a previous patch.
      
      Instead of cdc_ether spewing the link speed into the dmesg buffer,
      record the link speed encoded in these notifications and tell the
      usbnet framework to use the new functions to get link speed/state.
      
      User space can now get the most recent link speed/state using ethtool.
      
      v4: added to series since cdc_ether uses same notifications
          as cdc_ncm driver.
      Signed-off-by: default avatarGrant Grundler <grundler@chromium.org>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d42ebcbb
    • Oliver Neukum's avatar
      net: cdc_ncm: record speed in status method · eb47c274
      Oliver Neukum authored
      Until very recently, the usbnet framework only had support functions
      for devices which reported the link speed by explicitly querying the
      PHY over a MDIO interface. However, the cdc_ncm devices send
      notifications when the link state or link speeds change and do not
      expose the PHY (or modem) directly.
      
      Support funtions (e.g. usbnet_get_link_ksettings_internal()) to directly
      query state recorded by the cdc_ncm driver were added in a previous patch.
      
      So instead of cdc_ncm spewing the link speed into the dmesg buffer,
      record the link speed encoded in these notifications and tell the
      usbnet framework to use the new functions to get link speed/state.
      Link speed/state is now available via ethtool.
      
      This is especially useful given all current RTL8156 devices emit
      a connection/speed status notification every 32ms and this would
      fill the dmesg buffer. This implementation replaces the one
      recently submitted in de658a19 :
         "net: usb: cdc_ncm: don't spew notifications"
      
      v2: rebased on upstream
      v3: changed variable names
      v4: rewrote commit message
      Signed-off-by: default avatarOliver Neukum <oneukum@suse.com>
      Tested-by: default avatarRoland Dreier <roland@kernel.org>
      Signed-off-by: default avatarGrant Grundler <grundler@chromium.org>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      eb47c274
    • Oliver Neukum's avatar
      usbnet: add method for reporting speed without MII · 956baa99
      Oliver Neukum authored
      The old method for reporting link speed assumed a driver uses the
      generic phy (mii) MDIO read/write functions. CDC devices don't
      expose the phy.
      
      Add a primitive internal version reporting back directly what
      the CDC notification/status operations recorded.
      
      v2: rebased on upstream
      v3: changed names and made clear which units are used
      v4: moved hunks to correct patch; rewrote commmit messages
      Signed-off-by: default avatarOliver Neukum <oneukum@suse.com>
      Tested-by: default avatarRoland Dreier <roland@kernel.org>
      Reviewed-by: default avatarGrant Grundler <grundler@chromium.org>
      Tested-by: default avatarGrant Grundler <grundler@chromium.org>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      956baa99
    • Oliver Neukum's avatar
      usbnet: add _mii suffix to usbnet_set/get_link_ksettings · 77651900
      Oliver Neukum authored
      The generic functions assumed devices provided an MDIO interface (accessed
      via older mii code, not phylib). This is true only for genuine ethernet.
      
      Devices with a higher level of abstraction or based on different
      technologies do not have MDIO. To support this case, first rename
      the existing functions with _mii suffix.
      
      v2: rebased on changed upstream
      v3: changed names to clearly say that this does NOT use phylib
      v4: moved hunks to correct patch; reworded commmit messages
      
      Signed-off-by : Oliver Neukum <oneukum@suse.com>
      Tested-by: default avatarRoland Dreier <roland@kernel.org>
      Reviewed-by: default avatarGrant Grundler <grundler@chromium.org>
      Tested-by: default avatarGrant Grundler <grundler@chromium.org>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      77651900
    • Manoj Basapathi's avatar
      tcp: Reset tcp connections in SYN-SENT state · e880f8b3
      Manoj Basapathi authored
      Userspace sends tcp connection (sock) destroy on network switch
      i.e switching the default network of the device between multiple
      networks(Cellular/Wifi/Ethernet).
      
      Kernel though doesn't send reset for the connections in SYN-SENT state
      and these connections continue to remain.
      Even as per RFC 793, there is no hard rule to not send RST on ABORT in
      this state.
      
      Modify tcp_abort and tcp_disconnect behavior to send RST for connections
      in syn-sent state to avoid lingering connections on network switch.
      Signed-off-by: default avatarManoj Basapathi <manojbm@codeaurora.org>
      Signed-off-by: default avatarSauvik Saha <ssaha@codeaurora.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e880f8b3
  2. 05 Apr, 2021 23 commits
  3. 04 Apr, 2021 2 commits
  4. 03 Apr, 2021 3 commits
    • David S. Miller's avatar
      Merge branch 'stmmac-xdp' · 428e68e1
      David S. Miller authored
      Ong Boon Leong says:
      
      ====================
      stmmac: Add XDP support
      
      This is the v4 patch series for adding XDP native support to stmmac.
      
      Changes in v4:
      5/6: Move TX clean timer setup to the end of NAPI RX process and
           group it under stmmac_finalize_xdp_rx().
           Also, fixed stmmac_xdp_xmit_back() returns STMMAC_XDP_CONSUMED
           if XDP buffer conversion to XDP frame fails.
      
      6/6: Move xdp_do_flush(0 into stmmac_finalize_xdp_rx() and combine
           the XDP verdict of XDP TX and XDP REDIRECT together.
      
      I retested the patch series on the 'xdp2' and 'xdp_redirect' related to
      changes above and found the result to be satisfactory.
      
      History of previous patch series:
      v3: https://patchwork.kernel.org/project/netdevbpf/cover/20210331154135.8507-1-boon.leong.ong@intel.com/
      v2: https://patchwork.kernel.org/project/netdevbpf/list/?series=457757
      v1: https://patchwork.kernel.org/project/netdevbpf/list/?series=457139
      
      It will be great if community can help to test or review the v4 series
      and provide me any input if any.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      428e68e1
    • Ong Boon Leong's avatar
      net: stmmac: Add support for XDP_REDIRECT action · 8b278a5b
      Ong Boon Leong authored
      This patch adds the support of XDP_REDIRECT to another remote cpu for
      further action. It also implements ndo_xdp_xmit ops, enabling the driver
      to transmit packets forwarded to it by XDP program running on another
      interface.
      
      This patch has been tested using "xdp_redirect_cpu" for XDP_REDIRECT
      + drop testing. It also been tested with "xdp_redirect" sample app
      which can be used to exercise ndo_xdp_xmit ops. The burst traffics are
      generated using pktgen_sample03_burst_single_flow.sh in samples/pktgen
      directory.
      
      v4: Move xdp_do_flush() processing into stmmac_finalize_xdp_rx() and
          combined the XDP verdict of XDP TX and REDIRECT together.
      
      v3: Added 'nq->trans_start = jiffies' to avoid TX time-out as we are
          sharing TX queue between slow path and XDP. Thanks to Jakub Kicinski
          for point out.
      Signed-off-by: default avatarOng Boon Leong <boon.leong.ong@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8b278a5b
    • Ong Boon Leong's avatar
      net: stmmac: Add support for XDP_TX action · be8b38a7
      Ong Boon Leong authored
      This patch adds support for XDP_TX action which enables XDP program to
      transmit back received frames.
      
      This patch has been tested with the "xdp2" app located in samples/bpf
      dir. The DUT receives burst traffic packet generated using pktgen script
      'pktgen_sample03_burst_single_flow.sh'.
      
      v4: Moved stmmac_tx_timer_arm() to be done once at the end of NAPI RX.
          Fixed stmmac_xdp_xmit_back() to return STMMAC_XDP_CONSUMED if
          XDP buffer to frame conversion fails. Thanks to Jakub's input.
      
      v3: Added 'nq->trans_start = jiffies' to avoid TX time-out as we are
          sharing TX queue between slow path and XDP. Thanks to Jakub Kicinski
          for pointing out.
      Signed-off-by: default avatarOng Boon Leong <boon.leong.ong@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      be8b38a7