1. 17 6月, 2021 1 次提交
  2. 10 6月, 2021 1 次提交
  3. 03 6月, 2021 8 次提交
  4. 18 5月, 2021 1 次提交
    • Y
      net: netronome: nfp: Fix wrong function name in comments · a507b164
      Yang Shen 提交于
      Fixes the following W=1 kernel build warning(s):
      
       drivers/net/ethernet/netronome/nfp/ccm_mbox.c:52: warning: expecting prototype for struct nfp_ccm_mbox_skb_cb. Prototype was for struct nfp_ccm_mbox_cmsg_cb instead
       drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c:35: warning: expecting prototype for struct nfp_tun_pre_run_rule. Prototype was for struct nfp_tun_pre_tun_rule instead
       drivers/net/ethernet/netronome/nfp/nfpcore/nfp_nffw.c:38: warning: expecting prototype for NFFW_INFO_VERSION history(). Prototype was for NFFW_INFO_VERSION_CURRENT() instead
      
      Cc: Simon Horman <simon.horman@netronome.com>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Signed-off-by: NYang Shen <shenyang39@huawei.com>
      Reviewed-by: NSimon Horman <simon.horman@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a507b164
  5. 22 4月, 2021 1 次提交
  6. 07 4月, 2021 1 次提交
  7. 31 3月, 2021 1 次提交
  8. 30 3月, 2021 1 次提交
  9. 26 3月, 2021 1 次提交
  10. 18 3月, 2021 1 次提交
  11. 17 3月, 2021 3 次提交
  12. 14 3月, 2021 1 次提交
  13. 15 1月, 2021 1 次提交
  14. 09 1月, 2021 2 次提交
  15. 08 1月, 2021 1 次提交
  16. 18 12月, 2020 1 次提交
  17. 10 12月, 2020 1 次提交
    • J
      nfp: silence set but not used warning with IPV6=n · c0ead555
      Jakub Kicinski 提交于
      Test robot reports:
      
      drivers/net/ethernet/netronome/nfp/crypto/tls.c: In function 'nfp_net_tls_rx_resync_req':
      drivers/net/ethernet/netronome/nfp/crypto/tls.c:477:18: warning: variable 'ipv6h' set but not used [-Wunused-but-set-variable]
        477 |  struct ipv6hdr *ipv6h;
            |                  ^~~~~
      In file included from include/linux/compiler_types.h:65,
                          from <command-line>:
      drivers/net/ethernet/netronome/nfp/crypto/tls.c: In function 'nfp_net_tls_add':
      include/linux/compiler_attributes.h:208:41: warning: statement will never be executed [-Wswitch-unreachable]
        208 | # define fallthrough                    __attribute__((__fallthrough__))
            |                                         ^~~~~~~~~~~~~
      drivers/net/ethernet/netronome/nfp/crypto/tls.c:299:3: note: in expansion of macro 'fallthrough'
        299 |   fallthrough;
            |   ^~~~~~~~~~~
      
      Use the IPv6 header in the switch, it doesn't matter which header
      we use to read the version field.
      Reported-by: Nkernel test robot <lkp@intel.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      Reviewed-by: NSimon Horman <simon.horman@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c0ead555
  18. 09 12月, 2020 1 次提交
    • T
      xdp: Remove the xdp_attachment_flags_ok() callback · 998f1729
      Toke Høiland-Jørgensen 提交于
      Since commit 7f0a8382 ("bpf, xdp: Maintain info on attached XDP BPF
      programs in net_device"), the XDP program attachment info is now maintained
      in the core code. This interacts badly with the xdp_attachment_flags_ok()
      check that prevents unloading an XDP program with different load flags than
      it was loaded with. In practice, two kinds of failures are seen:
      
      - An XDP program loaded without specifying a mode (and which then ends up
        in driver mode) cannot be unloaded if the program mode is specified on
        unload.
      
      - The dev_xdp_uninstall() hook always calls the driver callback with the
        mode set to the type of the program but an empty flags argument, which
        means the flags_ok() check prevents the program from being removed,
        leading to bpf prog reference leaks.
      
      The original reason this check was added was to avoid ambiguity when
      multiple programs were loaded. With the way the checks are done in the core
      now, this is quite simple to enforce in the core code, so let's add a check
      there and get rid of the xdp_attachment_flags_ok() callback entirely.
      
      Fixes: 7f0a8382 ("bpf, xdp: Maintain info on attached XDP BPF programs in net_device")
      Signed-off-by: NToke Høiland-Jørgensen <toke@redhat.com>
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NJakub Kicinski <kuba@kernel.org>
      Link: https://lore.kernel.org/bpf/160752225751.110217.10267659521308669050.stgit@toke.dk
      998f1729
  19. 05 12月, 2020 2 次提交
    • S
      nfp: Replace zero-length array with flexible-array member · 7f356166
      Simon Horman 提交于
      There is a regular need in the kernel to provide a way to declare having a
      dynamically sized set of trailing elements in a structure. Kernel code
      should always use "flexible array members"[1] for these cases. The older
      style of one-element or zero-length arrays should no longer be used[2].
      
      [1] https://en.wikipedia.org/wiki/Flexible_array_member
      [2] https://www.kernel.org/doc/html/v5.9/process/deprecated.html#zero-length-and-one-element-arrays
      
      Cc: Gustavo A. R. Silva <gustavoars@kernel.org>
      Signed-off-by: NSimon Horman <simon.horman@netronome.com>
      Signed-off-by: NLouis Peens <louis.peens@netronome.com>
      Link: https://lore.kernel.org/r/20201204125601.24876-1-simon.horman@netronome.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      7f356166
    • A
      ethernet: select CONFIG_CRC32 as needed · 0b32e91f
      Arnd Bergmann 提交于
      A number of ethernet drivers require crc32 functionality to be
      avaialable in the kernel, causing a link error otherwise:
      
      arm-linux-gnueabi-ld: drivers/net/ethernet/agere/et131x.o: in function `et1310_setup_device_for_multicast':
      et131x.c:(.text+0x5918): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/cadence/macb_main.o: in function `macb_start_xmit':
      macb_main.c:(.text+0x4b88): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/faraday/ftgmac100.o: in function `ftgmac100_set_rx_mode':
      ftgmac100.c:(.text+0x2b38): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/freescale/fec_main.o: in function `set_multicast_list':
      fec_main.c:(.text+0x6120): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/freescale/fman/fman_dtsec.o: in function `dtsec_add_hash_mac_address':
      fman_dtsec.c:(.text+0x830): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/freescale/fman/fman_dtsec.o:fman_dtsec.c:(.text+0xb68): more undefined references to `crc32_le' follow
      arm-linux-gnueabi-ld: drivers/net/ethernet/netronome/nfp/nfpcore/nfp_hwinfo.o: in function `nfp_hwinfo_read':
      nfp_hwinfo.c:(.text+0x250): undefined reference to `crc32_be'
      arm-linux-gnueabi-ld: nfp_hwinfo.c:(.text+0x288): undefined reference to `crc32_be'
      arm-linux-gnueabi-ld: drivers/net/ethernet/netronome/nfp/nfpcore/nfp_resource.o: in function `nfp_resource_acquire':
      nfp_resource.c:(.text+0x144): undefined reference to `crc32_be'
      arm-linux-gnueabi-ld: nfp_resource.c:(.text+0x158): undefined reference to `crc32_be'
      arm-linux-gnueabi-ld: drivers/net/ethernet/nxp/lpc_eth.o: in function `lpc_eth_set_multicast_list':
      lpc_eth.c:(.text+0x1934): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/rocker/rocker_ofdpa.o: in function `ofdpa_flow_tbl_do':
      rocker_ofdpa.c:(.text+0x2e08): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/rocker/rocker_ofdpa.o: in function `ofdpa_flow_tbl_del':
      rocker_ofdpa.c:(.text+0x3074): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/rocker/rocker_ofdpa.o: in function `ofdpa_port_fdb':
      arm-linux-gnueabi-ld: drivers/net/ethernet/mellanox/mlx5/core/steering/dr_ste.o: in function `mlx5dr_ste_calc_hash_index':
      dr_ste.c:(.text+0x354): undefined reference to `crc32_le'
      arm-linux-gnueabi-ld: drivers/net/ethernet/microchip/lan743x_main.o: in function `lan743x_netdev_set_multicast':
      lan743x_main.c:(.text+0x5dc4): undefined reference to `crc32_le'
      
      Add the missing 'select CRC32' entries in Kconfig for each of them.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Acked-by: NNicolas Ferre <nicolas.ferre@microchip.com>
      Acked-by: NMadalin Bucur <madalin.bucur@oss.nxp.com>
      Acked-by: NMark Einon <mark.einon@gmail.com>
      Acked-by: NSimon Horman <simon.horman@netronome.com>
      Link: https://lore.kernel.org/r/20201203232114.1485603-1-arnd@kernel.orgSigned-off-by: NJakub Kicinski <kuba@kernel.org>
      0b32e91f
  20. 01 12月, 2020 1 次提交
  21. 20 11月, 2020 1 次提交
    • J
      devlink: move request_firmware out of driver · b44cfd4f
      Jacob Keller 提交于
      All drivers which implement the devlink flash update support, with the
      exception of netdevsim, use either request_firmware or
      request_firmware_direct to locate the firmware file. Rather than having
      each driver do this separately as part of its .flash_update
      implementation, perform the request_firmware within net/core/devlink.c
      
      Replace the file_name parameter in the struct devlink_flash_update_params
      with a pointer to the fw object.
      
      Use request_firmware rather than request_firmware_direct. Although most
      Linux distributions today do not have the fallback mechanism
      implemented, only about half the drivers used the _direct request, as
      compared to the generic request_firmware. In the event that
      a distribution does support the fallback mechanism, the devlink flash
      update ought to be able to use it to provide the firmware contents. For
      distributions which do not support the fallback userspace mechanism,
      there should be essentially no difference between request_firmware and
      request_firmware_direct.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Acked-by: NShannon Nelson <snelson@pensando.io>
      Acked-by: NVasundhara Volam <vasundhara-v.volam@broadcom.com>
      Reviewed-by: NJiri Pirko <jiri@nvidia.com>
      Signed-off-by: NJakub Kicinski <kuba@kernel.org>
      b44cfd4f
  22. 19 11月, 2020 1 次提交
  23. 13 11月, 2020 1 次提交
  24. 26 9月, 2020 2 次提交
    • J
      devlink: convert flash_update to use params structure · bc75c054
      Jacob Keller 提交于
      The devlink core recently gained support for checking whether the driver
      supports a flash_update parameter, via `supported_flash_update_params`.
      However, parameters are specified as function arguments. Adding a new
      parameter still requires modifying the signature of the .flash_update
      callback in all drivers.
      
      Convert the .flash_update function to take a new `struct
      devlink_flash_update_params` instead. By using this structure, and the
      `supported_flash_update_params` bit field, a new parameter to
      flash_update can be added without requiring modification to existing
      drivers.
      
      As before, all parameters except file_name will require driver opt-in.
      Because file_name is a necessary field to for the flash_update to make
      sense, no "SUPPORTED" bitflag is provided and it is always considered
      valid. All future additional parameters will require a new bit in the
      supported_flash_update_params bitfield.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Reviewed-by: NJakub Kicinski <kuba@kernel.org>
      Cc: Jiri Pirko <jiri@mellanox.com>
      Cc: Jakub Kicinski <kuba@kernel.org>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Michael Chan <michael.chan@broadcom.com>
      Cc: Bin Luo <luobin9@huawei.com>
      Cc: Saeed Mahameed <saeedm@mellanox.com>
      Cc: Leon Romanovsky <leon@kernel.org>
      Cc: Ido Schimmel <idosch@mellanox.com>
      Cc: Danielle Ratson <danieller@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bc75c054
    • J
      devlink: check flash_update parameter support in net core · 22ec3d23
      Jacob Keller 提交于
      When implementing .flash_update, drivers which do not support
      per-component update are manually checking the component parameter to
      verify that it is NULL. Without this check, the driver might accept an
      update request with a component specified even though it will not honor
      such a request.
      
      Instead of having each driver check this, move the logic into
      net/core/devlink.c, and use a new `supported_flash_update_params` field
      in the devlink_ops. Drivers which will support per-component update must
      now specify this by setting DEVLINK_SUPPORT_FLASH_UPDATE_COMPONENT in
      the supported_flash_update_params in their devlink_ops.
      
      This helps ensure that drivers do not forget to check for a NULL
      component if they do not support per-component update. This also enables
      a slightly better error message by enabling the core stack to set the
      netlink bad attribute message to indicate precisely the unsupported
      attribute in the message.
      
      Going forward, any new additional parameter to flash update will require
      a bit in the supported_flash_update_params bitfield.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Reviewed-by: NJakub Kicinski <kuba@kernel.org>
      Cc: Jiri Pirko <jiri@mellanox.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Michael Chan <michael.chan@broadcom.com>
      Cc: Bin Luo <luobin9@huawei.com>
      Cc: Saeed Mahameed <saeedm@mellanox.com>
      Cc: Leon Romanovsky <leon@kernel.org>
      Cc: Ido Schimmel <idosch@mellanox.com>
      Cc: Danielle Ratson <danieller@mellanox.com>
      Cc: Shannon Nelson <snelson@pensando.io>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      22ec3d23
  25. 18 9月, 2020 1 次提交
  26. 16 9月, 2020 1 次提交
  27. 15 9月, 2020 1 次提交
  28. 03 9月, 2020 1 次提交