Skip to content

Commit bf3a058

Browse files
jarodwilsondavem330
authored andcommitted
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 <[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]>
1 parent 0dea9ea commit bf3a058

File tree

1 file changed

+6
-0
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core/en_accel

1 file changed

+6
-0
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@ static inline int mlx5e_xfrm_validate_state(struct xfrm_state *x)
210210
struct net_device *netdev = x->xso.dev;
211211
struct mlx5e_priv *priv;
212212

213+
if (x->xso.slave_dev)
214+
netdev = x->xso.slave_dev;
215+
213216
priv = netdev_priv(netdev);
214217

215218
if (x->props.aalgo != SADB_AALG_NONE) {
@@ -291,6 +294,9 @@ static int mlx5e_xfrm_add_state(struct xfrm_state *x)
291294
unsigned int sa_handle;
292295
int err;
293296

297+
if (x->xso.slave_dev)
298+
netdev = x->xso.slave_dev;
299+
294300
priv = netdev_priv(netdev);
295301

296302
err = mlx5e_xfrm_validate_state(x);

0 commit comments

Comments
 (0)