]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
authorJakub Kicinski <kuba@kernel.org>
Thu, 28 Apr 2022 20:01:50 +0000 (13:01 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 28 Apr 2022 20:02:01 +0000 (13:02 -0700)
include/linux/netdevice.h
net/core/dev.c
  6510ea973d8d ("net: Use this_cpu_inc() to increment net->core_stats")
  794c24e9921f ("net-core: rx_otherhost_dropped to core_stats")
https://lore.kernel.org/all/20220428111903.5f4304e0@canb.auug.org.au/

drivers/net/wan/cosa.c
  d48fea8401cf ("net: cosa: fix error check return value of register_chrdev()")
  89fbca3307d4 ("net: wan: remove support for COSA and SRP synchronous serial boards")
https://lore.kernel.org/all/20220428112130.1f689e5e@canb.auug.org.au/

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
18 files changed:
1  2 
MAINTAINERS
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_mbx.c
drivers/net/ethernet/ibm/ibmvnic.c
drivers/net/ethernet/ibm/ibmvnic.h
drivers/net/ethernet/intel/ice/ice_main.c
include/linux/netdevice.h
include/net/tcp.h
net/bpf/test_run.c
net/bridge/br_switchdev.c
net/core/dev.c
net/dsa/port.c
net/dsa/slave.c
net/ipv4/tcp_input.c
net/ipv4/tcp_output.c
net/ipv4/tcp_rate.c
net/tls/tls_device.c
net/xdp/xsk.c

diff --cc MAINTAINERS
Simple merge
Simple merge
index 90d6833fb1db6305a65a1d1b2e7ccdaa18353f45,1310c861bf834e91a09a5303100e587b96a64d31..e5c6ff3d0c4728cbf186db6234fc09163f5bea86
  #define IBMVNIC_TSO_BUFS      64
  #define IBMVNIC_TSO_POOL_MASK 0x80000000
  
 -#define IBMVNIC_MAX_LTB_SIZE ((1 << (MAX_ORDER - 1)) * PAGE_SIZE)
 -#define IBMVNIC_BUFFER_HLEN 500
 +/* A VNIC adapter has set of Rx and Tx pools (aka queues). Each Rx/Tx pool
 + * has a set of buffers. The size of each buffer is determined by the MTU.
 + *
 + * Each Rx/Tx pool is also associated with a DMA region that is shared
 + * with the "hardware" (VIOS) and used to send/receive packets. The DMA
 + * region is also referred to as a Long Term Buffer or LTB.
 + *
 + * The size of the DMA region required for an Rx/Tx pool depends on the
 + * number and size (MTU) of the buffers in the pool. At the max levels
 + * of 4096 jumbo frames (MTU=9000) we will need about 9K*4K = 36MB plus
 + * some padding.
 + *
 + * But the size of a single DMA region is limited by MAX_ORDER in the
 + * kernel (about 16MB currently).  To support say 4K Jumbo frames, we
 + * use a set of LTBs (struct ltb_set) per pool.
 + *
 + * IBMVNIC_ONE_LTB_MAX  - max size of each LTB supported by kernel
 + * IBMVNIC_ONE_LTB_SIZE - current max size of each LTB in an ltb_set
 + * (must be <= IBMVNIC_ONE_LTB_MAX)
 + * IBMVNIC_LTB_SET_SIZE - current size of all LTBs in an ltb_set
 + *
 + * Each VNIC can have upto 16 Rx, 16 Tx and 16 TSO pools. The TSO pools
 + * are of fixed length (IBMVNIC_TSO_BUF_SZ * IBMVNIC_TSO_BUFS) of 4MB.
 + *
 + * The Rx and Tx pools can have upto 4096 buffers. The max size of these
 + * buffers is about 9588 (for jumbo frames, including IBMVNIC_BUFFER_HLEN).
 + * So, setting the IBMVNIC_LTB_SET_SIZE for a pool to 4096 * 9588 ~= 38MB.
 + *
 + * There is a trade-off in setting IBMVNIC_ONE_LTB_SIZE. If it is large,
 + * the allocation of the LTB can fail when system is low in memory. If
 + * its too small, we would need several mappings for each of the Rx/
 + * Tx/TSO pools but there is a limit of 255 mappings per vnic in the
 + * VNIC protocol.
 + *
 + * So setting IBMVNIC_ONE_LTB_SIZE to 8MB. With IBMVNIC_LTB_SET_SIZE set
 + * to 38MB, we will need 5 LTBs per Rx and Tx pool and 1 LTB per TSO
 + * pool for the 4MB. Thus the 16 Rx and Tx queues require 32 * 5 = 160
 + * plus 16 for the TSO pools for a total of 176 LTB mappings per VNIC.
 + */
 +#define IBMVNIC_ONE_LTB_MAX   ((u32)((1 << (MAX_ORDER - 1)) * PAGE_SIZE))
 +#define IBMVNIC_ONE_LTB_SIZE  min((u32)(8 << 20), IBMVNIC_ONE_LTB_MAX)
 +#define IBMVNIC_LTB_SET_SIZE  (38 << 20)
  
 +#define IBMVNIC_BUFFER_HLEN           500
  #define IBMVNIC_RESET_DELAY 100
  
- static const char ibmvnic_priv_flags[][ETH_GSTRING_LEN] = {
- #define IBMVNIC_USE_SERVER_MAXES 0x1
-       "use-server-maxes"
- };
  struct ibmvnic_login_buffer {
        __be32 len;
        __be32 version;
index ac8a5f71220a999aebabd73d8df2c8e2b1325ad4,b1fbe21650bb5ed1d8593d895ba3106869311074..b75ca2d095aed919873fb450189262c9ef88ca69
@@@ -200,11 -199,10 +200,11 @@@ struct net_device_stats 
   * Try to fit them in a single cache line, for dev_get_stats() sake.
   */
  struct net_device_core_stats {
-       local_t         rx_dropped;
-       local_t         tx_dropped;
-       local_t         rx_nohandler;
-       local_t         rx_otherhost_dropped;
- } __aligned(4 * sizeof(local_t));
+       unsigned long   rx_dropped;
+       unsigned long   tx_dropped;
+       unsigned long   rx_nohandler;
++      unsigned long   rx_otherhost_dropped;
+ } __aligned(4 * sizeof(unsigned long));
  
  #include <linux/cache.h>
  #include <linux/skbuff.h>
Simple merge
Simple merge
Simple merge
diff --cc net/core/dev.c
index e09cd202fc579dfe2313243e20def8044aafafa2,1461c2d9dec8099a9a2d43a704b4c6cb0375f480..7a61690d3137c48228fb4a473fff7b39fdf8134b
@@@ -10410,10 -10352,9 +10406,10 @@@ struct rtnl_link_stats64 *dev_get_stats
  
                for_each_possible_cpu(i) {
                        core_stats = per_cpu_ptr(p, i);
-                       storage->rx_dropped += local_read(&core_stats->rx_dropped);
-                       storage->tx_dropped += local_read(&core_stats->tx_dropped);
-                       storage->rx_nohandler += local_read(&core_stats->rx_nohandler);
-                       storage->rx_otherhost_dropped += local_read(&core_stats->rx_otherhost_dropped);
+                       storage->rx_dropped += READ_ONCE(core_stats->rx_dropped);
+                       storage->tx_dropped += READ_ONCE(core_stats->tx_dropped);
+                       storage->rx_nohandler += READ_ONCE(core_stats->rx_nohandler);
++                      storage->rx_otherhost_dropped += READ_ONCE(core_stats->rx_otherhost_dropped);
                }
        }
        return storage;
diff --cc net/dsa/port.c
Simple merge
diff --cc net/dsa/slave.c
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
diff --cc net/xdp/xsk.c
Simple merge