[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <98a94275-8351-33c6-50b9-dc3cc3f51f53@amd.com>
Date: Wed, 14 Jun 2023 12:12:09 -0700
From: Brett Creeley <bcreeley@....com>
To: Magnus Karlsson <magnus.karlsson@...il.com>, magnus.karlsson@...el.com,
intel-wired-lan@...ts.osuosl.org, anthony.l.nguyen@...el.com,
maciej.fijalkowski@...el.com, hao.ma@...el.com
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH iwl-next] ixgbe: allow toggling loopback mode via
ndo_set_features callback
On 6/1/2023 12:46 AM, Magnus Karlsson wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> From: Hao Ma <hao.ma@...el.com>
>
> 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
> used by selftests/bpf/xskxceiver.
>
> Signed-off-by: Hao Ma <hao.ma@...el.com>
> ---
> .../net/ethernet/intel/ixgbe/ixgbe_common.c | 4 +-
> drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 73 +++++++++++++++++++
> drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 1 +
> 3 files changed, 76 insertions(+), 2 deletions(-)
>
[...]
> @@ -10969,6 +11040,8 @@ static int ixgbe_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
> if (hw->mac.type >= ixgbe_mac_82599EB)
> netdev->features |= NETIF_F_SCTP_CRC | NETIF_F_GSO_UDP_L4;
>
> + netdev->features |= NETIF_F_LOOPBACK;
This means NETIF_F_LOOPBACK is enabled by default. Was that the
intention? It seems like NETIF_F_LOOPBACK should only be set for
netdev->hw_features on probe. I didn't test this, so it would be worth
double this patch functions as expected with this change.
> +
> #ifdef CONFIG_IXGBE_IPSEC
> #define IXGBE_ESP_FEATURES (NETIF_F_HW_ESP | \
> NETIF_F_HW_ESP_TX_CSUM | \
> diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
> index 2b00db92b08f..ca50ccd59b50 100644
> --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
> +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_type.h
> @@ -3652,6 +3652,7 @@ struct ixgbe_hw {
> bool allow_unsupported_sfp;
> bool wol_enabled;
> bool need_crosstalk_fix;
> + bool loopback_on;
> };
>
> struct ixgbe_info {
>
> base-commit: 735c9ee9a374769b78c716de3c19a6c9440ede85
> --
> 2.34.1
>
>
Powered by blists - more mailing lists