]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
i40e: allow toggling loopback mode via ndo_set_features callback
authorTirthendu Sarkar <tirthendu.sarkar@intel.com>
Fri, 9 Dec 2022 18:55:53 +0000 (10:55 -0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 12 Dec 2022 23:24:47 +0000 (15:24 -0800)
commitb1746fbab15a1d6d5e61846f260f8fece1fca576
treeccde0c9402bf8650e949a51f03b5d14e1ed599b9
parent2a78dd22c2eba50cba8254d4166481791ed884bc
i40e: allow toggling loopback mode via ndo_set_features callback

Add support for NETIF_F_LOOPBACK. This feature can be set via:
$ ethtool -K eth0 loopback <on|off>

This sets the MAC Tx->Rx loopback.

This feature is used for the xsk selftests, and might have other uses
too.

Signed-off-by: Tirthendu Sarkar <tirthendu.sarkar@intel.com>
Reviewed-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Tested-by: Magnus Karlsson <magnus.karlsson@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Link: https://lore.kernel.org/r/20221209185553.2520088-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/intel/i40e/i40e_adminq_cmd.h
drivers/net/ethernet/intel/i40e/i40e_common.c
drivers/net/ethernet/intel/i40e/i40e_main.c
drivers/net/ethernet/intel/i40e/i40e_prototype.h