netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] mlx4: mark napi id for gro_skb
@ 2014-07-14  3:42 Jason Wang
  2014-07-14 23:14 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Wang @ 2014-07-14  3:42 UTC (permalink / raw)
  To: amirv, netdev, linux-kernel; +Cc: Jason Wang

Napi id was not marked for gro_skb, this will lead rx busy loop won't
work correctly since they stack never try to call low latency receive
method because of a zero socket napi id. Fix this by marking napi id
for gro_skb.

The transaction rate of 1 byte netperf tcp_rr gets about 50% increased
(from 20531.68 to 30610.88).

Cc: Amir Vadai <amirv@mellanox.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
---
 drivers/net/ethernet/mellanox/mlx4/en_rx.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index 9672417..5535862 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -783,6 +783,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
 							     PKT_HASH_TYPE_L3);
 
 					skb_record_rx_queue(gro_skb, cq->ring);
+					skb_mark_napi_id(gro_skb, &cq->napi);
 
 					if (ring->hwtstamp_rx_filter == HWTSTAMP_FILTER_ALL) {
 						timestamp = mlx4_en_get_cqe_ts(cqe);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] mlx4: mark napi id for gro_skb
  2014-07-14  3:42 [PATCH net] mlx4: mark napi id for gro_skb Jason Wang
@ 2014-07-14 23:14 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2014-07-14 23:14 UTC (permalink / raw)
  To: jasowang; +Cc: amirv, netdev, linux-kernel

From: Jason Wang <jasowang@redhat.com>
Date: Mon, 14 Jul 2014 11:42:44 +0800

> Napi id was not marked for gro_skb, this will lead rx busy loop won't
> work correctly since they stack never try to call low latency receive
> method because of a zero socket napi id. Fix this by marking napi id
> for gro_skb.
> 
> The transaction rate of 1 byte netperf tcp_rr gets about 50% increased
> (from 20531.68 to 30610.88).
> 
> Cc: Amir Vadai <amirv@mellanox.com>
> Signed-off-by: Jason Wang <jasowang@redhat.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-07-14 23:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-14  3:42 [PATCH net] mlx4: mark napi id for gro_skb Jason Wang
2014-07-14 23:14 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).