diff options
author | Maxim Mikityanskiy <maximmi@mellanox.com> | 2019-12-05 18:07:25 +0200 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2020-05-09 01:05:39 -0700 |
commit | f02bac9ad6415e40bf32bf84ce5832698ebe5d15 (patch) | |
tree | d0d3337fea600a46fee35c8ca0a1ac5aea8ce32e /drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | |
parent | 76cd622fe2c2b10c1f0a7311ca797feccacc329d (diff) | |
download | linux-f02bac9ad6415e40bf32bf84ce5832698ebe5d15.tar.bz2 |
net/mlx5e: Return bool from TLS and IPSEC offloads
TLS and IPSEC offloads currently return struct sk_buff *, but the value
is either NULL or the same skb that was passed as a parameter. Return
bool instead to provide stronger guarantees to the calling code (it
won't need to support handling a different SKB that could be potentially
returned before this change) and to simplify restructuring this code in
the following commits.
Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_tx.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c index 583e1b201b75..7a6ed72ae00a 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c @@ -394,8 +394,7 @@ netdev_tx_t mlx5e_xmit(struct sk_buff *skb, struct net_device *dev) wqe = MLX5E_TX_FETCH_WQE(sq, pi); /* might send skbs and update wqe and pi */ - skb = mlx5e_accel_handle_tx(skb, sq, dev, &wqe, &pi); - if (unlikely(!skb)) + if (unlikely(!mlx5e_accel_handle_tx(skb, sq, dev, &wqe, &pi))) return NETDEV_TX_OK; return mlx5e_sq_xmit(sq, skb, wqe, pi, netdev_xmit_more()); |