Skip to content

Commit

Permalink
mlx5: become aware of when running as a bonding slave
Browse files Browse the repository at this point in the history
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 <[email protected]>
CC: Saeed Mahameed <[email protected]>
CC: Leon Romanovsky <[email protected]>
CC: Jay Vosburgh <[email protected]>
CC: Veaceslav Falico <[email protected]>
CC: Andy Gospodarek <[email protected]>
CC: "David S. Miller" <[email protected]>
CC: Jeff Kirsher <[email protected]>
CC: Jakub Kicinski <[email protected]>
CC: Steffen Klassert <[email protected]>
CC: Herbert Xu <[email protected]>
CC: [email protected]
Signed-off-by: Jarod Wilson <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
jarodwilson authored and davem330 committed Jun 22, 2020
1 parent 0dea9ea commit bf3a058
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

priv = netdev_priv(netdev);

if (x->props.aalgo != SADB_AALG_NONE) {
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit bf3a058

Please sign in to comment.