aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
diff options
context:
space:
mode:
authorMaxim Mikityanskiy <maximmi@mellanox.com>2019-12-05 18:07:25 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2020-05-09 01:05:39 -0700
commitf02bac9ad6415e40bf32bf84ce5832698ebe5d15 (patch)
treed0d3337fea600a46fee35c8ca0a1ac5aea8ce32e /drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
parentMerge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux (diff)
downloadlinux-dev-f02bac9ad6415e40bf32bf84ce5832698ebe5d15.tar.xz
linux-dev-f02bac9ad6415e40bf32bf84ce5832698ebe5d15.zip
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 '')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_tx.c3
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());