- 29 6月, 2022 5 次提交
-
-
由 Jonathan Cooper 提交于
As we have a lot of common code this applies to all NIC architectures. Signed-off-by: NJonathan Cooper <jonathan.s.cooper@amd.com> Co-developed-by: NMartin Habets <habetsm.xilinx@gmail.com> Signed-off-by: NMartin Habets <habetsm.xilinx@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jonathan Cooper 提交于
Once we separate struct efx_nic memory from net_device memory the existing usage will have to change. Apart from the new function efx_netdev_priv() accesses have been changed using: sed -i 's/netdev_priv/efx_netdev_priv/' Signed-off-by: NJonathan Cooper <jonathan.s.cooper@amd.com> Co-developed-by: NMartin Habets <habetsm.xilinx@gmail.com> Signed-off-by: NMartin Habets <habetsm.xilinx@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jonathan Cooper 提交于
Pre-emptively fix a checkpatch warning in a subsequent patch. Signed-off-by: NJonathan Cooper <jonathan.s.cooper@amd.com> Co-developed-by: NMartin Habets <habetsm.xilinx@gmail.com> Signed-off-by: NMartin Habets <habetsm.xilinx@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jonathan Cooper 提交于
Move functionality involving the struct net_device out of efx_init_struct so that we can initialise without a net dev for VDPA operation. Signed-off-by: NJonathan Cooper <jonathan.s.cooper@amd.com> Co-developed-by: NMartin Habets <habetsm.xilinx@gmail.com> Signed-off-by: NMartin Habets <habetsm.xilinx@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Jonathan Cooper 提交于
This patch splits the READY state in to NET_UP and NET_DOWN. This is to prepare for future work to delay resource allocation until interface up so that we can use resources more efficiently in SRIOV environments, and also to lay the ground work for an extra PROBED state where we don't create a network interface, for VDPA operation. Signed-off-by: NJonathan Cooper <jonathan.s.cooper@amd.com> Acked-by: NMartin Habets <habetsm.xilinx@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 06 5月, 2022 1 次提交
-
-
由 Jakub Kicinski 提交于
Drivers should call the TSO setting helper, GSO is controllable by user space. Signed-off-by: NJakub Kicinski <kuba@kernel.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 04 5月, 2022 1 次提交
-
-
由 Martin Habets 提交于
Disable the build of Siena code until later in this patch series. Prevent sfc.ko from binding to Siena NICs. efx_init_sriov/efx_fini_sriov is only used for Siena. Remove calls to those. Signed-off-by: NMartin Habets <habetsm.xilinx@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 30 12月, 2021 1 次提交
-
-
由 Jakub Kicinski 提交于
sock.h is pretty heavily used (5k objects rebuilt on x86 after it's touched). We can drop the include of filter.h from it and add a forward declaration of struct sk_filter instead. This decreases the number of rebuilt objects when bpf.h is touched from ~5k to ~1k. There's a lot of missing includes this was masking. Primarily in networking tho, this time. Signed-off-by: NJakub Kicinski <kuba@kernel.org> Signed-off-by: NAlexei Starovoitov <ast@kernel.org> Acked-by: NMarc Kleine-Budde <mkl@pengutronix.de> Acked-by: NFlorian Fainelli <f.fainelli@gmail.com> Acked-by: NNikolay Aleksandrov <nikolay@nvidia.com> Acked-by: NStefano Garzarella <sgarzare@redhat.com> Link: https://lore.kernel.org/bpf/20211229004913.513372-1-kuba@kernel.org
-
- 22 11月, 2021 1 次提交
-
-
由 Eric Dumazet 提交于
dev->gso_max_segs is written under RTNL protection, or when the device is not yet visible, but is read locklessly. Add netif_set_gso_max_segs() helper. Add the READ_ONCE()/WRITE_ONCE() pairs, and use netif_set_gso_max_segs() where we can to better document what is going on. Signed-off-by: NEric Dumazet <edumazet@google.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 02 10月, 2021 1 次提交
-
-
由 Jakub Kicinski 提交于
Convert Ethernet from ether_addr_copy() to eth_hw_addr_set(): @@ expression dev, np; @@ - ether_addr_copy(dev->dev_addr, np) + eth_hw_addr_set(dev, np) Signed-off-by: NJakub Kicinski <kuba@kernel.org> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 21 8月, 2021 2 次提交
-
-
由 Heiner Kallweit 提交于
Use pci_vpd_find_ro_info_keyword() to search for keywords in VPD to simplify the code. Replace netif_err() with pci_err() because the netdevice isn't registered yet, which results in very ugly messages. Use kmemdup_nul() instead of open-coding it. Link: https://lore.kernel.org/r/bf5d4ba9-61a9-2bfe-19ec-75472732d74d@gmail.comSigned-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
由 Heiner Kallweit 提交于
Use pci_vpd_alloc() to dynamically allocate a properly sized buffer and read the full VPD data into it. This avoids having to allocate a buffer on the stack, and we don't have to make any assumptions on VPD size and location of information in VPD. Link: https://lore.kernel.org/r/e58f1e40-c043-0266-9a0f-e5a7f3f6883c@gmail.comSigned-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 28 7月, 2021 1 次提交
-
-
由 Arnd Bergmann 提交于
Most users of ndo_do_ioctl are ethernet drivers that implement the MII commands SIOCGMIIPHY/SIOCGMIIREG/SIOCSMIIREG, or hardware timestamping with SIOCSHWTSTAMP/SIOCGHWTSTAMP. Separate these from the few drivers that use ndo_do_ioctl to implement SIOCBOND, SIOCBR and SIOCWANDEV commands. This is a purely cosmetic change intended to help readers find their way through the implementation. Cc: Doug Ledford <dledford@redhat.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Jay Vosburgh <j.vosburgh@gmail.com> Cc: Veaceslav Falico <vfalico@gmail.com> Cc: Andy Gospodarek <andy@greyhouse.net> Cc: Andrew Lunn <andrew@lunn.ch> Cc: Vivien Didelot <vivien.didelot@gmail.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: Vladimir Oltean <olteanv@gmail.com> Cc: Leon Romanovsky <leon@kernel.org> Cc: linux-rdma@vger.kernel.org Signed-off-by: NArnd Bergmann <arnd@arndb.de> Acked-by: NJason Gunthorpe <jgg@nvidia.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 24 5月, 2021 1 次提交
-
-
由 YueHaibing 提交于
Use DEVICE_ATTR_*() helper instead of plain DEVICE_ATTR, which makes the code a bit shorter and easier to read. Signed-off-by: NYueHaibing <yuehaibing@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 15 5月, 2021 1 次提交
-
-
由 Heiner Kallweit 提交于
Using netif_info() before the net_device is registered results in ugly messages like the following: sfc 0000:01:00.1 (unnamed net_device) (uninitialized): Solarflare NIC detected Therefore use pci_info() et al until net_device is registered. Signed-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 01 5月, 2021 1 次提交
-
-
由 Heiner Kallweit 提交于
All callers pass 0 as offset. Therefore remove the parameter and use a fixed offset 0 in pci_vpd_find_tag(). Link: https://lore.kernel.org/r/f62e6e19-5423-2ead-b2bd-62844b23ef8f@gmail.comSigned-off-by: NHeiner Kallweit <hkallweit1@gmail.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 08 1月, 2021 1 次提交
-
-
由 Jakub Kicinski 提交于
All UDP tunnel port management is now routed via udp_tunnel_nic infra directly. Remove the old callbacks. Reviewed-by: NAlexander Duyck <alexanderduyck@fb.com> Reviewed-by: NJacob Keller <jacob.e.keller@intel.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
- 12 9月, 2020 1 次提交
-
-
由 Edward Cree 提交于
Necessitates an .ndo_features_check, as the EF10 datapath has several limitations on what it can handle. Signed-off-by: NEdward Cree <ecree@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 08 9月, 2020 2 次提交
-
-
由 Edward Cree 提交于
Per-module versions for in-tree drivers are deprecated. Signed-off-by: NEdward Cree <ecree@solarflare.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
由 Edward Cree 提交于
Originally there were several implementations of PHY operations for the several different PHYs used on Falcon boards. But Falcon is now in a separate driver, and all sfc NICs since then have had MCDI-managed PHYs. Thus, there is no need to indirect through function pointers in efx->phy_op; we can simply call the efx_mcdi_phy_* functions directly. This also hooks up these functions for EF100, which was previously using the dummy_phy_ops. Signed-off-by: NEdward Cree <ecree@solarflare.com> Signed-off-by: NJakub Kicinski <kuba@kernel.org>
-
- 28 7月, 2020 1 次提交
-
-
由 Edward Cree 提交于
No TX or RX path, no MCDI, not even an ifup/down handler. Besides stubs, the bulk of the patch deals with reading the Xilinx extended PCIe capability, which tells us where to find our BAR. Though in the same module, EF100 has its own struct pci_driver, which is named sfc_ef100. A small number of additional nic_type methods are added; those in the TX (tx_enqueue) and RX (rx_packet) paths are called through indirect call wrappers to minimise the performance impact. Signed-off-by: NEdward Cree <ecree@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 26 7月, 2020 1 次提交
-
-
由 Andrii Nakryiko 提交于
Now that BPF program/link management is centralized in generic net_device code, kernel code never queries program id from drivers, so XDP_QUERY_PROG/XDP_QUERY_PROG_HW commands are unnecessary. This patch removes all the implementations of those commands in kernel, along the xdp_attachment_query(). This patch was compile-tested on allyesconfig. Signed-off-by: NAndrii Nakryiko <andriin@fb.com> Signed-off-by: NAlexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200722064603.3350758-10-andriin@fb.com
-
- 24 7月, 2020 1 次提交
-
-
由 Jakub Kicinski 提交于
Check MC_CMD_DRV_ATTACH_EXT_OUT_FLAG_TRUSTED, before setting the info, which will hopefully protect us from -EPERM errors the previous code was gracefully ignoring. Ed reports this is not the 100% correct bit, but it's the best approximation we have. Shared code reports the port information back to user space, so we really want to know what was added and what failed. Ignoring -EPERM is not an option. The driver does not call udp_tunnel_get_rx_info(), so its own management of table state is not really all that problematic, we can leave it be. This allows the driver to continue with its copious table syncing, and matching the ports to TX frames, which it will reportedly do one day. Leave the feature checking in the callbacks, as the device may remove the capabilities on reset. Inline the loop from __efx_ef10_udp_tnl_lookup_port() into efx_ef10_udp_tnl_has_port(), since it's the only caller now. With new infra this driver gains port replace - when space frees up in a full table a new port will be selected for offload. Plus efx will no longer sleep in an atomic context. v2: - amend the commit message about TRUSTED not being 100% - add TUNNEL_ENCAP_UDP_PORT_ENTRY_INVALID to mark unsed entries Signed-off-by: NJakub Kicinski <kuba@kernel.org> Acked-By: NEdward Cree <ecree@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 08 7月, 2020 1 次提交
-
-
由 Luc Van Oostenryck 提交于
The method struct pci_error_handlers.error_detected() is defined and documented as taking an 'enum pci_channel_state' for the second argument, but most drivers use 'pci_channel_state_t' instead. This 'pci_channel_state_t' is not a typedef for the enum but a typedef for a bitwise type in order to have better/stricter typechecking. Consolidate everything by using 'pci_channel_state_t' in the method's definition, in the related helpers and in the drivers. Enforce use of 'pci_channel_state_t' by replacing 'enum pci_channel_state' with an anonymous 'enum'. Note: Currently, from a typechecking point of view this patch changes nothing because only the constants defined by the enum are bitwise, not the enum itself (sparse doesn't have the notion of 'bitwise enum'). This may change in some not too far future, hence the patch. [bhelgaas: squash in https://lore.kernel.org/r/20200702162651.49526-3-luc.vanoostenryck@gmail.com https://lore.kernel.org/r/20200702162651.49526-4-luc.vanoostenryck@gmail.com] Link: https://lore.kernel.org/r/20200702162651.49526-2-luc.vanoostenryck@gmail.comSigned-off-by: NLuc Van Oostenryck <luc.vanoostenryck@gmail.com> Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
-
- 03 7月, 2020 4 次提交
-
-
由 Edward Cree 提交于
While we're at it, also check them for failure. Signed-off-by: NEdward Cree <ecree@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Edward Cree 提交于
Instead of exposing this old module parameter on the new driver (thus having to keep it forever after for compatibility), let's confine it to the old one; if we find later that we need the feature, we ought to support it properly, with ethtool set-channels. Signed-off-by: NEdward Cree <ecree@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Edward Cree 提交于
EF100 only supports MSI-X, so there's no need for the new driver to expose this old module parameter. Since it's now visible to the linker, we have to rename it internally to efx_interrupt_mode to avoid symbol collisions in non-modular builds. Signed-off-by: NEdward Cree <ecree@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Edward Cree 提交于
Unprivileged functions (such as VFs) may set their MTU by use of the 'control' field of MC_CMD_SET_MAC_EXT, as used in efx_mcdi_set_mtu(). If calling efx_ef10_mac_reconfigure() from efx_change_mtu(), and the NIC supports the above (SET_MAC_ENHANCED capability), use it rather than efx_mcdi_set_mac(). Signed-off-by: NEdward Cree <ecree@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 01 7月, 2020 2 次提交
-
-
由 Edward Cree 提交于
Signed-off-by: NEdward Cree <ecree@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Edward Cree 提交于
Various left-over bits and pieces from efx.c that are needed by ef100. Signed-off-by: NEdward Cree <ecree@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 30 6月, 2020 3 次提交
-
-
由 Edward Cree 提交于
EF100 will use the same mechanisms for PCI error recovery. Signed-off-by: NEdward Cree <ecree@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Edward Cree 提交于
EF100 needs to map multiple BARs (sequentially, not concurrently) in order to read the Function Control Window during probe. Signed-off-by: NEdward Cree <ecree@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Edward Cree 提交于
Signed-off-by: NEdward Cree <ecree@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 20 2月, 2020 1 次提交
-
-
由 YueHaibing 提交于
drivers/net/ethernet/sfc/efx.c:116:38: warning: efx_default_channel_type defined but not used [-Wunused-const-variable=] commit 83975485 ("sfc: move channel alloc/removal code") left behind this, remove it. Reported-by: NHulk Robot <hulkci@huawei.com> Fixes: 83975485 ("sfc: move channel alloc/removal code") Signed-off-by: NYueHaibing <yuehaibing@huawei.com> Acked-by: NMartin Habets <mhabets@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 16 1月, 2020 1 次提交
-
-
由 YueHaibing 提交于
Remove duplicated include. Signed-off-by: NYueHaibing <yuehaibing@huawei.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 11 1月, 2020 4 次提交
-
-
由 Alex Maftei (amaftei) 提交于
Includes a couple of filtering functions and also renames a constant. Style fixes included. Signed-off-by: NAlexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Maftei (amaftei) 提交于
Functions are not related. Signed-off-by: NAlexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Maftei (amaftei) 提交于
Style fixes included. Signed-off-by: NAlexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Alex Maftei (amaftei) 提交于
Signed-off-by: NAlexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
- 10 1月, 2020 1 次提交
-
-
由 Alex Maftei (amaftei) 提交于
A few bits were extracted from other functions. Signed-off-by: NAlexandru-Mihai Maftei <amaftei@solarflare.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-