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.gr...@nxp.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 ?