All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Emeel Hakim <ehakim@nvidia.com>
Cc: <davem@davemloft.net>, <pabeni@redhat.com>, <edumazet@google.com>,
	<sd@queasysnail.net>, <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 1/4] vlan: Add MACsec offload operations for VLAN interface
Date: Mon, 27 Mar 2023 09:43:35 -0700	[thread overview]
Message-ID: <20230327094335.07f462f9@kernel.org> (raw)
In-Reply-To: <20230326072636.3507-2-ehakim@nvidia.com>

On Sun, 26 Mar 2023 10:26:33 +0300 Emeel Hakim wrote:
> @@ -572,6 +573,9 @@ static int vlan_dev_init(struct net_device *dev)
>  			   NETIF_F_HIGHDMA | NETIF_F_SCTP_CRC |
>  			   NETIF_F_ALL_FCOE;
>  
> +	if (real_dev->features & NETIF_F_HW_MACSEC)
> +		dev->hw_features |= NETIF_F_HW_MACSEC;
> +
>  	dev->features |= dev->hw_features | NETIF_F_LLTX;
>  	netif_inherit_tso_max(dev, real_dev);
>  	if (dev->features & NETIF_F_VLAN_FEATURES)
> @@ -660,6 +664,9 @@ static netdev_features_t vlan_dev_fix_features(struct net_device *dev,
>  	features |= old_features & (NETIF_F_SOFT_FEATURES | NETIF_F_GSO_SOFTWARE);
>  	features |= NETIF_F_LLTX;
>  
> +	if (real_dev->features & NETIF_F_HW_MACSEC)
> +		features |= NETIF_F_HW_MACSEC;
> +
>  	return features;
>  }

Shouldn't vlan_features be consulted somehow?

> @@ -803,6 +810,49 @@ static int vlan_dev_fill_forward_path(struct net_device_path_ctx *ctx,
>  	return 0;
>  }
>  
> +#if IS_ENABLED(CONFIG_MACSEC)
> +#define VLAN_MACSEC_MDO(mdo) \
> +static int vlan_macsec_ ## mdo(struct macsec_context *ctx) \
> +{ \
> +	const struct macsec_ops *ops; \
> +	ops =  vlan_dev_priv(ctx->netdev)->real_dev->macsec_ops; \
> +	return ops ? ops->mdo_ ## mdo(ctx) : -EOPNOTSUPP; \
> +}
> +
> +#define VLAN_MACSEC_DECLARE_MDO(mdo) vlan_macsec_ ## mdo
> +
> +VLAN_MACSEC_MDO(add_txsa);
> +VLAN_MACSEC_MDO(upd_txsa);
> +VLAN_MACSEC_MDO(del_txsa);
> +
> +VLAN_MACSEC_MDO(add_rxsa);
> +VLAN_MACSEC_MDO(upd_rxsa);
> +VLAN_MACSEC_MDO(del_rxsa);
> +
> +VLAN_MACSEC_MDO(add_rxsc);
> +VLAN_MACSEC_MDO(upd_rxsc);
> +VLAN_MACSEC_MDO(del_rxsc);
> +
> +VLAN_MACSEC_MDO(add_secy);
> +VLAN_MACSEC_MDO(upd_secy);
> +VLAN_MACSEC_MDO(del_secy);

-1

impossible to grep for the functions :( but maybe others don't care

  reply	other threads:[~2023-03-27 16:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-26  7:26 [PATCH net-next 0/4] Support MACsec VLAN Emeel Hakim
2023-03-26  7:26 ` [PATCH net-next 1/4] vlan: Add MACsec offload operations for VLAN interface Emeel Hakim
2023-03-27 16:43   ` Jakub Kicinski [this message]
2023-03-28  6:54     ` Emeel Hakim
2023-03-28 18:20       ` Francois Romieu
2023-03-29 11:07         ` Emeel Hakim
2023-03-28 22:41       ` Jakub Kicinski
2023-03-29 11:08         ` Emeel Hakim
2023-03-26  7:26 ` [PATCH net-next 2/4] net/mlx5: Support MACsec over VLAN Emeel Hakim
2023-03-26  7:26 ` [PATCH net-next 3/4] net/mlx5: Consider VLAN interface in MACsec TX steering rules Emeel Hakim
2023-03-26  7:26 ` [PATCH net-next 4/4] macsec: Add MACsec rx_handler change support Emeel Hakim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230327094335.07f462f9@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=ehakim@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sd@queasysnail.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.