Re: [net-next PATCH] mlx4: add missed recycle opportunity for XDP_TX on TX failure
On Mon, 19 Sep 2016 07:28:35 -0700 Eric Dumazetwrote: > > + xdp_drop: > > A label should start at the beginning of the line (ie : not indented) Understood, send a V2 -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat Author of http://www.iptv-analyzer.org LinkedIn: http://www.linkedin.com/in/brouer
Re: [net-next PATCH] mlx4: add missed recycle opportunity for XDP_TX on TX failure
On Mon, 2016-09-19 at 09:40 +0200, Jesper Dangaard Brouer wrote: > 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> --- > 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..919f0604d04a 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, > _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: A label should start at the beginning of the line (ie : not indented) > if (mlx4_en_rx_recycle(ring, frags)) > goto consumed; > goto next; >
Re: [net-next PATCH] mlx4: add missed recycle opportunity for XDP_TX on TX failure
On 19/09/2016 10:40 AM, Jesper Dangaard Brouer wrote: 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--- 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..919f0604d04a 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, _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; Reviewed-by: Tariq Toukan Thanks.