mirror_ubuntu-kernels/drivers/net/ethernet/sfc
Jakub Kicinski 205a55f4e6 sfc: convert to new udp_tunnel infrastructure
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: Jakub Kicinski <kuba@kernel.org>
Acked-By: Edward Cree <ecree@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2020-07-23 11:36:06 -07:00
..
falcon treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
bitfield.h sfc: extend bitfield macros up to POPULATE_DWORD_13 2020-06-29 17:37:48 -07:00
ef10_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ef10_sriov.c sfc: move vport_id to struct efx_nic 2020-05-11 13:31:49 -07:00
ef10_sriov.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ef10.c sfc: convert to new udp_tunnel infrastructure 2020-07-23 11:36:06 -07:00
efx_channels.c sfc: assign TXQs without gaps 2020-07-02 14:47:40 -07:00
efx_channels.h sfc: move modparam 'rss_cpus' out of common channel code 2020-07-02 14:47:40 -07:00
efx_common.c sfc: initialise RSS context ID to 'no RSS context' in efx_init_struct() 2020-07-02 14:47:40 -07:00
efx_common.h sfc: support setting MTU even if not privileged to configure MAC fully 2020-07-02 14:47:39 -07:00
efx.c sfc: convert to new udp_tunnel infrastructure 2020-07-23 11:36:06 -07:00
efx.h sfc: commonise miscellaneous efx functions 2020-06-30 13:09:09 -07:00
enum.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ethtool_common.c sfc: get drvinfo driver name from outside the common code 2020-07-02 14:47:40 -07:00
ethtool_common.h sfc: get drvinfo driver name from outside the common code 2020-07-02 14:47:40 -07:00
ethtool.c sfc: get drvinfo driver name from outside the common code 2020-07-02 14:47:40 -07:00
farch_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
farch.c sfc: assign TXQs without gaps 2020-07-02 14:47:40 -07:00
filter.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
io.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
Kconfig treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
Makefile sfc: move mcdi filtering code 2020-01-27 13:05:43 +01:00
mcdi_filters.c sfc_ef100: helper function to set default RSS table of given size 2020-07-02 14:47:40 -07:00
mcdi_filters.h sfc_ef100: helper function to set default RSS table of given size 2020-07-02 14:47:40 -07:00
mcdi_functions.c sfc_ef100: populate BUFFER_SIZE_BYTES in INIT_RXQ 2020-07-02 14:47:40 -07:00
mcdi_functions.h sfc: commonise efx_fini_dmaq 2020-07-02 14:47:40 -07:00
mcdi_mon.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
mcdi_pcol.h sfc: update MCDI protocol headers 2020-06-29 17:37:48 -07:00
mcdi_port_common.c sfc: commonise some MAC configuration code 2020-06-30 13:09:09 -07:00
mcdi_port_common.h sfc: move definition of EFX_MC_STATS_GENERATION_INVALID 2020-06-30 13:09:09 -07:00
mcdi_port.c sfc: commonise some MAC configuration code 2020-06-30 13:09:09 -07:00
mcdi_port.h sfc: move NIC-specific mcdi_port declarations out of common header 2020-06-30 13:09:09 -07:00
mcdi.c sfc_ef100: NVRAM selftest support code 2020-07-02 14:47:40 -07:00
mcdi.h sfc_ef100: NVRAM selftest support code 2020-07-02 14:47:40 -07:00
mtd.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
net_driver.h sfc: convert to new udp_tunnel infrastructure 2020-07-23 11:36:06 -07:00
nic_common.h sfc_ef100: add EF100 to NIC-revision enumeration 2020-07-02 14:47:40 -07:00
nic.c sfc: move definition of EFX_MC_STATS_GENERATION_INVALID 2020-06-30 13:09:09 -07:00
nic.h sfc: remove duplicate declaration of efx_enqueue_skb_tso() 2020-06-30 13:09:09 -07:00
ptp.c sfc: split up nic.h 2020-06-29 17:37:48 -07:00
ptp.h sfc: split up nic.h 2020-06-29 17:37:48 -07:00
rx_common.c sfc: extend common GRO interface to support CHECKSUM_COMPLETE 2020-06-29 17:37:49 -07:00
rx_common.h sfc: commonise efx_sync_rx_buffer() 2020-06-30 13:09:09 -07:00
rx.c sfc: commonise efx_sync_rx_buffer() 2020-06-30 13:09:09 -07:00
selftest.c sfc: assign TXQs without gaps 2020-07-02 14:47:40 -07:00
selftest.h sfc: refactor selftest work init code 2020-01-10 11:24:37 -08:00
siena_sriov.c sfc: move channel alloc/removal code 2020-01-08 13:28:03 -08:00
siena_sriov.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
siena.c sfc: assign TXQs without gaps 2020-07-02 14:47:40 -07:00
sriov.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
sriov.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
tx_common.c sfc: don't call tx_limit_len if NIC type doesn't have one 2020-07-02 14:47:40 -07:00
tx_common.h sfc: factor out efx_tx_tso_header_length() and understand encapsulation 2020-06-30 13:09:09 -07:00
tx_tso.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
tx.c sfc: assign TXQs without gaps 2020-07-02 14:47:40 -07:00
tx.h sfc: remove duplicate declaration of efx_enqueue_skb_tso() 2020-06-30 13:09:09 -07:00
vfdi.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
workarounds.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00