Commit bf3a058d authored by Jarod Wilson's avatar Jarod Wilson Committed by David S. Miller

mlx5: become aware of when running as a bonding slave

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@mellanox.com>
CC: Saeed Mahameed <saeedm@mellanox.com>
CC: Leon Romanovsky <leon@kernel.org>
CC: Jay Vosburgh <j.vosburgh@gmail.com>
CC: Veaceslav Falico <vfalico@gmail.com>
CC: Andy Gospodarek <andy@greyhouse.net>
CC: "David S. Miller" <davem@davemloft.net>
CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Steffen Klassert <steffen.klassert@secunet.com>
CC: Herbert Xu <herbert@gondor.apana.org.au>
CC: netdev@vger.kernel.org
Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0dea9ea9
...@@ -210,6 +210,9 @@ static inline int mlx5e_xfrm_validate_state(struct xfrm_state *x) ...@@ -210,6 +210,9 @@ static inline int mlx5e_xfrm_validate_state(struct xfrm_state *x)
struct net_device *netdev = x->xso.dev; struct net_device *netdev = x->xso.dev;
struct mlx5e_priv *priv; struct mlx5e_priv *priv;
if (x->xso.slave_dev)
netdev = x->xso.slave_dev;
priv = netdev_priv(netdev); priv = netdev_priv(netdev);
if (x->props.aalgo != SADB_AALG_NONE) { if (x->props.aalgo != SADB_AALG_NONE) {
...@@ -291,6 +294,9 @@ static int mlx5e_xfrm_add_state(struct xfrm_state *x) ...@@ -291,6 +294,9 @@ static int mlx5e_xfrm_add_state(struct xfrm_state *x)
unsigned int sa_handle; unsigned int sa_handle;
int err; int err;
if (x->xso.slave_dev)
netdev = x->xso.slave_dev;
priv = netdev_priv(netdev); priv = netdev_priv(netdev);
err = mlx5e_xfrm_validate_state(x); err = mlx5e_xfrm_validate_state(x);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment