1. 14 10月, 2021 24 次提交
  2. 13 10月, 2021 10 次提交
  3. 12 10月, 2021 6 次提交
    • J
      ethernet: tulip: avoid duplicate variable name on sparc · 177c9235
      Jakub Kicinski 提交于
      I recently added a variable called addr to tulip_init_one()
      but for sparc there's already a variable called that half
      way thru the function. Rename it to fix build.
      
      Fixes: ca879317 ("ethernet: tulip: remove direct netdev->dev_addr writes")
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      177c9235
    • H
      net: hns3: debugfs add support dumping page pool info · 850bfb91
      Hao Chen 提交于
      Add a file node "page_pool_info" for debugfs, then cat this
      file node to dump page pool info as below:
      
      QUEUE_ID  ALLOCATE_CNT  FREE_CNT      POOL_SIZE(PAGE_NUM)  ORDER  NUMA_ID  MAX_LEN
      0         512           0             512                  0      2        4K
      1         512           0             512                  0      2        4K
      2         512           0             512                  0      2        4K
      3         512           0             512                  0      2        4K
      4         512           0             512                  0      2        4K
      Signed-off-by: NHao Chen <chenhao288@hisilicon.com>
      Signed-off-by: NGuangbin Huang <huangguangbin2@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      850bfb91
    • J
      tulip: fix setting device address from rom · 25b90c19
      Jakub Kicinski 提交于
      I missed removing i from the array index when converting
      from a loop to a direct copy.
      
      Fixes: ca879317 ("ethernet: tulip: remove direct netdev->dev_addr writes")
      Reported-by: NJoe Perches <joe@perches.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      25b90c19
    • D
      Merge branch 'Managed-Neighbor-Entries' · 2ed08b5e
      David S. Miller 提交于
      Daniel Borkmann says:
      
      ====================
      Managed Neighbor Entries
      
      This series adds a couple of fixes related to NTF_EXT_LEARNED and NTF_USE
      neighbor flags, extends the UAPI with a new NDA_FLAGS_EXT netlink attribute
      in order to be able to add new neighbor flags from user space given all
      current struct ndmsg / ndm_flags bits are used up. Finally, the core of this
      series adds a new NTF_EXT_MANAGED flag to neighbors, which allows user space
      control planes to add 'managed' neighbor entries. Meaning, user space may
      either transition existing entries or can push down new L3 entries without
      lladdr into the kernel where the latter will periodically try to keep such
      NTF_EXT_MANAGED managed entries in reachable state. Main use case for this
      series are XDP / tc BPF load-balancers which make use of the bpf_fib_lookup()
      helper for backends. For more details, please see individual patches. Thanks!
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2ed08b5e
    • D
      net, neigh: Add NTF_MANAGED flag for managed neighbor entries · 7482e384
      Daniel Borkmann 提交于
      Allow a user space control plane to insert entries with a new NTF_EXT_MANAGED
      flag. The flag then indicates to the kernel that the neighbor entry should be
      periodically probed for keeping the entry in NUD_REACHABLE state iff possible.
      
      The use case for this is targeting XDP or tc BPF load-balancers which use
      the bpf_fib_lookup() BPF helper in order to piggyback on neighbor resolution
      for their backends. Given they cannot be resolved in fast-path, a control
      plane inserts the L3 (without L2) entries manually into the neighbor table
      and lets the kernel do the neighbor resolution either on the gateway or on
      the backend directly in case the latter resides in the same L2. This avoids
      to deal with L2 in the control plane and to rebuild what the kernel already
      does best anyway.
      
      NTF_EXT_MANAGED can be combined with NTF_EXT_LEARNED in order to avoid GC
      eviction. The kernel then adds NTF_MANAGED flagged entries to a per-neighbor
      table which gets triggered by the system work queue to periodically call
      neigh_event_send() for performing the resolution. The implementation allows
      migration from/to NTF_MANAGED neighbor entries, so that already existing
      entries can be converted by the control plane if needed. Potentially, we could
      make the interval for periodically calling neigh_event_send() configurable;
      right now it's set to DELAY_PROBE_TIME which is also in line with mlxsw which
      has similar driver-internal infrastructure c723c735 ("mlxsw: spectrum_router:
      Periodically update the kernel's neigh table"). In future, the latter could
      possibly reuse the NTF_MANAGED neighbors as well.
      
      Example:
      
        # ./ip/ip n replace 192.168.178.30 dev enp5s0 managed extern_learn
        # ./ip/ip n
        192.168.178.30 dev enp5s0 lladdr f4:8c:50:5e:71:9a managed extern_learn REACHABLE
        [...]
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NRoopa Prabhu <roopa@nvidia.com>
      Link: https://linuxplumbersconf.org/event/11/contributions/953/Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7482e384
    • R
      net, neigh: Extend neigh->flags to 32 bit to allow for extensions · 2c611ad9
      Roopa Prabhu 提交于
      Currently, all bits in struct ndmsg's ndm_flags are used up with the most
      recent addition of 435f2e7c ("net: bridge: add support for sticky fdb
      entries"). This makes it impossible to extend the neighboring subsystem
      with new NTF_* flags:
      
        struct ndmsg {
          __u8   ndm_family;
          __u8   ndm_pad1;
          __u16  ndm_pad2;
          __s32  ndm_ifindex;
          __u16  ndm_state;
          __u8   ndm_flags;
          __u8   ndm_type;
        };
      
      There are ndm_pad{1,2} attributes which are not used. However, due to
      uncareful design, the kernel does not enforce them to be zero upon new
      neighbor entry addition, and given they've been around forever, it is
      not possible to reuse them today due to risk of breakage. One option to
      overcome this limitation is to add a new NDA_FLAGS_EXT attribute for
      extended flags.
      
      In struct neighbour, there is a 3 byte hole between protocol and ha_lock,
      which allows neigh->flags to be extended from 8 to 32 bits while still
      being on the same cacheline as before. This also allows for all future
      NTF_* flags being in neigh->flags rather than yet another flags field.
      Unknown flags in NDA_FLAGS_EXT will be rejected by the kernel.
      Co-developed-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Signed-off-by: NRoopa Prabhu <roopa@nvidia.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2c611ad9