[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<AS8PR04MB84970C0D18E20CAB8693558B88CCA@AS8PR04MB8497.eurprd04.prod.outlook.com>
Date: Wed, 12 Nov 2025 01:56:02 +0000
From: Wei Fang <wei.fang@....com>
To: Frank Li <frank.li@....com>
CC: Shenwei Wang <shenwei.wang@....com>, Clark Wang <xiaoning.wang@....com>,
"andrew+netdev@...n.ch" <andrew+netdev@...n.ch>, "davem@...emloft.net"
<davem@...emloft.net>, "edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
"eric@...int.com" <eric@...int.com>, "imx@...ts.linux.dev"
<imx@...ts.linux.dev>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net-next 3/5] net: fec: remove struct
fec_enet_priv_txrx_info
> On Tue, Nov 11, 2025 at 06:00:55PM +0800, Wei Fang wrote:
> > The struct fec_enet_priv_txrx_info has three members: offset, page and
> > skb. The offset is only initialized in the driver and is not used, and
>
> the skb is never initialized and used in the driver. The both will not be used in the
> future, Therefore, replace struct fec_enet_priv_txrx_info directly with struct
> page.
>
> > we can see that it likely will not be used in the future. The skb is
> > never initialized and used in the driver. Therefore, struct
> > fec_enet_priv_txrx_info can be directly replaced by struct page.
> >
> > Signed-off-by: Wei Fang <wei.fang@....com>
> > ---
> > drivers/net/ethernet/freescale/fec.h | 8 +-------
> > drivers/net/ethernet/freescale/fec_main.c | 11 +++++------
> > 2 files changed, 6 insertions(+), 13 deletions(-)
> >
> ...
> >
> > @@ -1834,7 +1833,7 @@ fec_enet_rx_queue(struct net_device *ndev, u16
> queue_id, int budget)
> > ndev->stats.rx_bytes += pkt_len;
> >
> > index = fec_enet_get_bd_index(bdp, &rxq->bd);
> > - page = rxq->rx_skb_info[index].page;
> > + page = rxq->rx_buf[index];
> > cbd_bufaddr = bdp->cbd_bufaddr;
> > if (fec_enet_update_cbd(rxq, bdp, index)) {
> > ndev->stats.rx_dropped++;
> > @@ -3309,7 +3308,8 @@ static void fec_enet_free_buffers(struct net_device
> *ndev)
> > for (q = 0; q < fep->num_rx_queues; q++) {
> > rxq = fep->rx_queue[q];
> > for (i = 0; i < rxq->bd.ring_size; i++)
> > - page_pool_put_full_page(rxq->page_pool,
> rxq->rx_skb_info[i].page, false);
> > + page_pool_put_full_page(rxq->page_pool, rxq->rx_buf[i],
> > + false);
>
> move to previous line.
The line should no more than 80 characters
Powered by blists - more mailing lists