All of lore.kernel.org
 help / color / mirror / Atom feed
* [net PATCH] mlx4: fix XDP_TX is acting like XDP_PASS on TX ring full
@ 2016-09-16 20:36 Jesper Dangaard Brouer
  2016-09-16 20:37 ` Jesper Dangaard Brouer
                   ` (2 more replies)
  0 siblings, 3 replies; 18+ messages in thread
From: Jesper Dangaard Brouer @ 2016-09-16 20:36 UTC (permalink / raw)
  To: netdev, tariqt
  Cc: Eric Dumazet, tom, bblanco, Jesper Dangaard Brouer, rana.shahot,
	David S. Miller

The XDP_TX action can fail transmitting the frame in case the TX ring
is full or port is down.  In case of TX failure it should drop the
frame, and not as now call 'break' which is the same as XDP_PASS.

Fixes: 9ecc2d86171a ("net/mlx4_en: add xdp forwarding and data write support")
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>

---
Note, this fix have nothing to do with the page-refcnt bug I just reported.

 drivers/net/ethernet/mellanox/mlx4/en_rx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index 2040dad8611d..adcd55c655db 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -906,7 +906,7 @@ int mlx4_en_process_rx_cq(struct net_device *dev, struct mlx4_en_cq *cq, int bud
 							length, tx_index,
 							&doorbell_pending))
 					goto consumed;
-				break;
+				goto next; /* Drop on xmit failure */
 			default:
 				bpf_warn_invalid_xdp_action(act);
 			case XDP_ABORTED:

^ permalink raw reply related	[flat|nested] 18+ messages in thread
* [net PATCH] mlx4: fix XDP_TX is acting like XDP_PASS on TX ring full
@ 2016-09-16 19:47 Jesper Dangaard Brouer
  2016-09-16 20:00 ` Eric Dumazet
  0 siblings, 1 reply; 18+ messages in thread
From: Jesper Dangaard Brouer @ 2016-09-16 19:47 UTC (permalink / raw)
  To: netdev, tariqt
  Cc: tom, bblanco, rana.shahot, David S. Miller, Jesper Dangaard Brouer

The XDP_TX action can fail transmitting the frame in case the TX ring
is full or port is down.  In case of TX failure it should drop the
frame, and not as now call 'break' which is the same as XDP_PASS.

Fixes: 9ecc2d86171a ("net/mlx4_en: add xdp forwarding and data write support")
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>

---
Note, this fix have nothing to do with the page-refcnt bug I just reported.

 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 2040dad8611d..d414c67dfd12 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -906,6 +906,7 @@ 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;
 				break;
 			default:
 				bpf_warn_invalid_xdp_action(act);

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

end of thread, other threads:[~2016-09-20  8:58 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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             ` [net-next PATCH V2] " Jesper Dangaard Brouer
2016-09-20  8:58               ` 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
  -- strict thread matches above, loose matches on Subject: below --
2016-09-16 19:47 Jesper Dangaard Brouer
2016-09-16 20:00 ` Eric Dumazet
2016-09-16 20:29   ` Jesper Dangaard Brouer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.