[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7df8d76c-e177-b06c-20e4-e6aacbea6471@intel.com>
Date: Thu, 6 Jul 2023 13:59:18 +0200
From: Alexander Lobakin <aleksander.lobakin@...el.com>
To: <wei.fang@....com>
CC: <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<pabeni@...hat.com>, <ast@...nel.org>, <daniel@...earbox.net>,
<hawk@...nel.org>, <john.fastabend@...il.com>, <shenwei.wang@....com>,
<xiaoning.wang@....com>, <netdev@...r.kernel.org>, <linux-imx@....com>,
<linux-kernel@...r.kernel.org>, <bpf@...r.kernel.org>
Subject: Re: [PATCH V2 net 2/4] net: fec: recycle pages for transmitted XDP
frames
From: Wei Fang <wei.fang@....com>
Date: Thu, 6 Jul 2023 16:10:10 +0800
> From: Wei Fang <wei.fang@....com>
>
> Once the XDP frames have been successfully transmitted through the
> ndo_xdp_xmit() interface, it's the driver responsibility to free
> the frames so that the page_pool can recycle the pages and reuse
> them. However, this action is not implemented in the fec driver.
> This leads to a user-visible problem that the console will print
> the following warning log.
[...]
> + if (txq->tx_buf[i].xdp) {
> + xdp_return_frame(txq->tx_buf[i].xdp);
> + txq->tx_buf[i].xdp = NULL;
> + }
> +
> + /* restore default tx buffer type: FEC_TXBUF_T_SKB */
> + txq->tx_buf[i].type = FEC_TXBUF_T_SKB;
Here and in the related places below: maybe set ::type dynamically when
sending to either SKB or XDP instead of setting it only for XDP and then
restoring each time?
> }
> +
> bdp->cbd_bufaddr = cpu_to_fec32(0);
> bdp = fec_enet_get_nextdesc(bdp, &txq->bd);
> }
[...]
Thanks,
Olek
Powered by blists - more mailing lists