[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <68f2ff6ee06bf4520485121b15c0d8c10cad60d2.camel@mellanox.com>
Date: Thu, 11 Jun 2020 21:51:31 +0000
From: Saeed Mahameed <saeedm@...lanox.com>
To: "jarod@...hat.com" <jarod@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
CC: "vfalico@...il.com" <vfalico@...il.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"herbert@...dor.apana.org.au" <herbert@...dor.apana.org.au>,
"andy@...yhouse.net" <andy@...yhouse.net>,
"steffen.klassert@...unet.com" <steffen.klassert@...unet.com>,
"j.vosburgh@...il.com" <j.vosburgh@...il.com>,
Boris Pismenny <borisp@...lanox.com>,
"kuba@...nel.org" <kuba@...nel.org>,
"jeffrey.t.kirsher@...el.com" <jeffrey.t.kirsher@...el.com>,
"leon@...nel.org" <leon@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next v2 3/4] mlx5: become aware of when running as a
bonding slave
On Wed, 2020-06-10 at 14:59 -0400, Jarod Wilson wrote:
> I've been unable to get my hands on suitable supported hardware to
> date,
> but I believe this ought to be all that is needed to enable the mlx5
> driver to also work with bonding active-backup crypto offload
> passthru.
>
> CC: Boris Pismenny <borisp@...lanox.com>
> CC: Saeed Mahameed <saeedm@...lanox.com>
> CC: Leon Romanovsky <leon@...nel.org>
> CC: Jay Vosburgh <j.vosburgh@...il.com>
> CC: Veaceslav Falico <vfalico@...il.com>
> CC: Andy Gospodarek <andy@...yhouse.net>
> CC: "David S. Miller" <davem@...emloft.net>
> CC: Jeff Kirsher <jeffrey.t.kirsher@...el.com>
> CC: Jakub Kicinski <kuba@...nel.org>
> CC: Steffen Klassert <steffen.klassert@...unet.com>
> CC: Herbert Xu <herbert@...dor.apana.org.au>
> CC: netdev@...r.kernel.org
> Signed-off-by: Jarod Wilson <jarod@...hat.com>
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
> b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
> index 92eb3bad4acd..72ad6664bd73 100644
> --- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
> +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
> @@ -210,6 +210,9 @@ static inline int
> mlx5e_xfrm_validate_state(struct xfrm_state *x)
> struct net_device *netdev = x->xso.dev;
> struct mlx5e_priv *priv;
>
> + if (x->xso.slave_dev)
> + netdev = x->xso.slave_dev;
> +
Do we really need to repeat this per driver ?
why not just setup xso.real_dev, in xfrm layer once and for all before
calling device drivers ?
Device drivers will use xso.real_dev blindly.
Will be useful in the future when you add vlan support, etc..
> priv = netdev_priv(netdev);
>
> if (x->props.aalgo != SADB_AALG_NONE) {
> @@ -291,6 +294,9 @@ static int mlx5e_xfrm_add_state(struct xfrm_state
> *x)
> unsigned int sa_handle;
> int err;
>
> + if (x->xso.slave_dev)
> + netdev = x->xso.slave_dev;
> +
> priv = netdev_priv(netdev);
>
> err = mlx5e_xfrm_validate_state(x);
Powered by blists - more mailing lists