[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2380dc4cfc21ab598623a20c2569c8bf6444c12d.camel@kernel.org>
Date: Thu, 12 Nov 2020 12:55:59 -0800
From: Saeed Mahameed <saeed@...nel.org>
To: Camelia Groza <camelia.groza@....com>, kuba@...nel.org,
brouer@...hat.com, davem@...emloft.net
Cc: madalin.bucur@....nxp.com, ioana.ciornei@....com,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next 4/7] dpaa_eth: add XDP_TX support
On Thu, 2020-11-12 at 20:10 +0200, Camelia Groza wrote:
> Use an xdp_frame structure for managing the frame. Store a
> backpointer to
> the structure at the start of the buffer before enqueueing. Use the
> XDP
> API for freeing the buffer when it returns to the driver on the TX
> confirmation path.
>
> This approach will be reused for XDP REDIRECT.
>
> Signed-off-by: Camelia Groza <camelia.groza@....com>
> ---
> drivers/net/ethernet/freescale/dpaa/dpaa_eth.c | 129
> ++++++++++++++++++++++++-
> drivers/net/ethernet/freescale/dpaa/dpaa_eth.h | 2 +
> 2 files changed, 126 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> index b9b0db2..343d693 100644
> --- a/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> +++ b/drivers/net/ethernet/freescale/dpaa/dpaa_eth.c
> @@ -1130,6 +1130,24 @@ static int dpaa_fq_init(struct dpaa_fq
> *dpaa_fq, bool td_enable)
>
> dpaa_fq->fqid = qman_fq_fqid(fq);
>
> + if (dpaa_fq->fq_type == FQ_TYPE_RX_DEFAULT ||
> + dpaa_fq->fq_type == FQ_TYPE_RX_PCD) {
> + err = xdp_rxq_info_reg(&dpaa_fq->xdp_rxq, dpaa_fq-
> >net_dev,
> + dpaa_fq->fqid);
> + if (err) {
> + dev_err(dev, "xdp_rxq_info_reg failed\n");
> + return err;
> + }
> +
> + err = xdp_rxq_info_reg_mem_model(&dpaa_fq->xdp_rxq,
> + MEM_TYPE_PAGE_ORDER0,
> NULL);
why not MEM_TYPE_PAGE_POOL?
@Jesper how can we encourage new drivers to implement XDP
with MEM_TYPE_PAGE_POOL ?
Powered by blists - more mailing lists