[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6032c1be-4080-4103-b196-c3a44bd5df6b@lunn.ch>
Date: Tue, 2 May 2023 22:16:07 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Shenwei Wang <shenwei.wang@....com>
Cc: Wei Fang <wei.fang@....com>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Clark Wang <xiaoning.wang@....com>,
NXP Linux Team <linux-imx@....com>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
Alexander Lobakin <alexandr.lobakin@...el.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
imx@...ts.linux.dev, Gagandeep Singh <g.singh@....com>
Subject: Re: [PATCH 1/1] net: fec: enable the XDP_TX support
On Tue, May 02, 2023 at 02:32:19PM -0500, Shenwei Wang wrote:
> Enable the XDP_TX path and correct the return value of the xmit function.
>
> If any individual frame cannot transmit due to lack of BD entries, the
> function would still return success for sending all frames. This results
> in prematurely indicating frames were sent when they were actually dropped.
>
> The patch resolves the issue by ensureing the return value properly
> indicates the actual number of frames successfully transmitted, rather than
> potentially reporting success for all frames when some could not transmit.
Hi Shenwei
The patch subject is wrong. This do not enable the XDP_TX support, it
fixes the XDP_TX support.
Please also take a read of the netdev FAQ. You your put the tree in
the patch subject.
>
> Fixes: 6d6b39f180b8 ("net: fec: add initial XDP support")
> Signed-off-by: Gagandeep Singh <g.singh@....com>
> Signed-off-by: Shenwei Wang <shenwei.wang@....com>
> ---
> drivers/net/ethernet/freescale/fec_main.c | 27 ++++++++++++++++-------
> 1 file changed, 19 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index 160c1b3525f5..dfc1bcc9a8db 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -75,6 +75,10 @@
>
> static void set_multicast_list(struct net_device *ndev);
> static void fec_enet_itr_coal_set(struct net_device *ndev);
> +static int fec_enet_xdp_xmit(struct net_device *dev,
> + int num_frames,
> + struct xdp_frame **frames,
> + u32 flags);
For a minimal fix for net, this is O.K. But once net-next has opened,
please submit a patch which moves the code around to avoid the forward
declaration.
Andrew
Powered by blists - more mailing lists