[RFC TLS Offload Support 07/15] mlx/mlx5_core: Allow sending multiple packets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ilya Lesokhin <ilyal@xxxxxxxxxxxx>

Modify mlx5e_xmit to xmit multiple packet chained
using skb->next

Signed-off-by: Ilya Lesokhin <ilyal@xxxxxxxxxxxx>
Signed-off-by: Aviad Yehezkel <aviadye@xxxxxxxxxxxx>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_tx.c | 11 +++++++++--
 1 file changed, 9 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 e6ce509..f2d0cc0 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tx.c
@@ -35,7 +35,7 @@
 #include "en.h"
 
 #define MLX5E_SQ_NOPS_ROOM  MLX5_SEND_WQE_MAX_WQEBBS
-#define MLX5E_SQ_STOP_ROOM (MLX5_SEND_WQE_MAX_WQEBBS +\
+#define MLX5E_SQ_STOP_ROOM (2 * MLX5_SEND_WQE_MAX_WQEBBS +\
 			    MLX5E_SQ_NOPS_ROOM)
 
 void mlx5e_send_nop(struct mlx5e_sq *sq, bool notify_hw)
@@ -405,6 +405,8 @@ netdev_tx_t mlx5e_xmit(struct sk_buff *skb, struct net_device *dev)
 	struct mlx5e_sq *sq = NULL;
 	struct mlx5_accel_ops *accel_ops;
 	struct mlx5_swp_info swp_info = {0};
+	struct sk_buff *next;
+	int rc;
 
 	rcu_read_lock();
 	accel_ops = mlx5_accel_get(priv->mdev);
@@ -417,7 +419,12 @@ netdev_tx_t mlx5e_xmit(struct sk_buff *skb, struct net_device *dev)
 
 	sq = priv->txq_to_sq_map[skb_get_queue_mapping(skb)];
 
-	return mlx5e_sq_xmit(sq, skb, &swp_info);
+	do {
+		next = skb->next;
+		rc = mlx5e_sq_xmit(sq, skb, &swp_info);
+		skb = next;
+	} while (next);
+	return rc;
 }
 
 bool mlx5e_poll_tx_cq(struct mlx5e_cq *cq, int napi_budget)
-- 
2.7.4




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux