[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZxB7PUEr48EqmOQJ@lizhi-Precision-Tower-5810>
Date: Wed, 16 Oct 2024 22:49:33 -0400
From: Frank Li <Frank.li@....com>
To: Marc Kleine-Budde <mkl@...gutronix.de>
Cc: Wei Fang <wei.fang@....com>, Shenwei Wang <shenwei.wang@....com>,
Clark Wang <xiaoning.wang@....com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Richard Cochran <richardcochran@...il.com>, imx@...ts.linux.dev,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel@...gutronix.de
Subject: Re: [PATCH net-next 11/13] net: fec: fec_enet_rx_queue(): reduce
scope of data
On Wed, Oct 16, 2024 at 11:51:59PM +0200, Marc Kleine-Budde wrote:
> In order to clean up of the VLAN handling, reduce the scope of data.
>
Reviewed-by: Frank Li <Frank.Li@....com>
> Signed-off-by: Marc Kleine-Budde <mkl@...gutronix.de>
> ---
> drivers/net/ethernet/freescale/fec_main.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
> index fd7a78ec5fa8ac0f7d141779938a4690594dbef1..640fbde10861005e7e2eb23358bfeaac49ec1792 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -1686,7 +1686,6 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget)
> unsigned short status;
> struct sk_buff *skb;
> ushort pkt_len;
> - __u8 *data;
> int pkt_received = 0;
> struct bufdesc_ex *ebdp = NULL;
> bool vlan_packet_rcvd = false;
> @@ -1803,10 +1802,11 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget)
> skb_mark_for_recycle(skb);
>
> if (unlikely(need_swap)) {
> + u8 *data;
> +
> data = page_address(page) + FEC_ENET_XDP_HEADROOM;
> swap_buffer(data, pkt_len);
> }
> - data = skb->data;
>
> /* Extract the enhanced buffer descriptor */
> ebdp = NULL;
> @@ -1824,7 +1824,7 @@ fec_enet_rx_queue(struct net_device *ndev, u16 queue_id, int budget)
>
> vlan_packet_rcvd = true;
>
> - memmove(skb->data + VLAN_HLEN, data, ETH_ALEN * 2);
> + memmove(skb->data + VLAN_HLEN, skb->data, ETH_ALEN * 2);
> skb_pull(skb, VLAN_HLEN);
> }
>
>
> --
> 2.45.2
>
>
Powered by blists - more mailing lists