From: Jesper Dangaard Brouer <brouer@redhat.com>
To: netdev@vger.kernel.org, tariqt@mellanox.com
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
tom@herbertland.com, bblanco@plumgrid.com,
Jesper Dangaard Brouer <brouer@redhat.com>,
rana.shahot@gmail.com, "David S. Miller" <davem@davemloft.net>
Subject: [net-next PATCH V2] mlx4: add missed recycle opportunity for XDP_TX on TX failure
Date: Mon, 19 Sep 2016 17:46:38 +0200 [thread overview]
Message-ID: <20160919154556.10965.75722.stgit@firesoul> (raw)
In-Reply-To: <1474295315.22679.85.camel@edumazet-glaptop3.roam.corp.google.com>
Correct drop handling for XDP_TX on TX failure, were recently added in
commit 95357907ae73 ("mlx4: fix XDP_TX is acting like XDP_PASS on TX
ring full").
The change missed an opportunity for recycling the RX page, instead of
going through the page allocator, like the regular XDP_DROP action does.
This patch cease the opportunity, by going through the XDP_DROP case.
Fixes: 95357907ae73 ("mlx4: fix XDP_TX is acting like XDP_PASS on TX ring full")
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
---
V2: adjust indention according to Eric
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index c80073e4947f..c46355bce613 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -906,11 +906,12 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
length, tx_index,
&doorbell_pending))
goto consumed;
- goto next; /* Drop on xmit failure */
+ goto xdp_drop; /* Drop on xmit failure */
default:
bpf_warn_invalid_xdp_action(act);
case XDP_ABORTED:
case XDP_DROP:
+xdp_drop:
if (mlx4_en_rx_recycle(ring, frags))
goto consumed;
goto next;
next prev parent reply other threads:[~2016-09-19 15:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-16 20:36 [net PATCH] mlx4: fix XDP_TX is acting like XDP_PASS on TX ring full Jesper Dangaard Brouer
2016-09-16 20:37 ` Jesper Dangaard Brouer
2016-09-16 20:43 ` Brenden Blanco
2016-09-17 14:46 ` Jesper Dangaard Brouer
2016-09-17 15:48 ` [net PATCH V3] " Jesper Dangaard Brouer
2016-09-18 8:30 ` Tariq Toukan
2016-09-19 5:39 ` David Miller
2016-09-19 7:40 ` [net-next PATCH] mlx4: add missed recycle opportunity for XDP_TX on TX failure Jesper Dangaard Brouer
2016-09-19 10:54 ` Tariq Toukan
2016-09-19 14:28 ` Eric Dumazet
2016-09-19 15:46 ` Jesper Dangaard Brouer [this message]
2016-09-20 8:58 ` [net-next PATCH V2] " David Miller
2016-09-19 15:57 ` [net-next PATCH] " Jesper Dangaard Brouer
2016-09-19 7:42 ` [net PATCH V3] mlx4: fix XDP_TX is acting like XDP_PASS on TX ring full Jesper Dangaard Brouer
2016-09-19 5:32 ` [net PATCH] " David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160919154556.10965.75722.stgit@firesoul \
--to=brouer@redhat.com \
--cc=bblanco@plumgrid.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rana.shahot@gmail.com \
--cc=tariqt@mellanox.com \
--cc=tom@herbertland.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).