Den ons 12 sep. 2018 kl 11:21 skrev Ilias Apalodimas
<ilias.apalodi...@linaro.org>:
>
> On Wed, Sep 12, 2018 at 11:14:57AM +0200, Jesper Dangaard Brouer wrote:
> > On Wed, 12 Sep 2018 12:02:38 +0300
> > Ilias Apalodimas <ilias.apalodi...@linaro.org> wrote:
> >
> > > @@ -1003,20 +1076,29 @@ static int netsec_setup_rx_dring(struct 
> > > netsec_priv *priv)
> > >             u16 len;
> > >
> > >             buf = netsec_alloc_rx_data(priv, &dma_handle, &len);
> > > -           if (!buf) {
> > > -                   netsec_uninit_pkt_dring(priv, NETSEC_RING_RX);
> > > +           if (!buf)
> > >                     goto err_out;
> > > -           }
> > >             desc->dma_addr = dma_handle;
> > >             desc->addr = buf;
> > >             desc->len = len;
> > >     }
> > >
> > >     netsec_rx_fill(priv, 0, DESC_NUM);
> > > +   err = xdp_rxq_info_reg(&dring->xdp_rxq, priv->ndev, 0);
> >
> > Do you only have 1 RX queue? (last arg to xdp_rxq_info_reg is 0),
> >
> >
> Yes the current driver is only supporting a single queue (same for Tx)

XDP and skbuff path sharing the same queue? You'll probably need some
means of synchronization between the .ndo_xmit_xdp and .ndo_start_xmit
implementations. And it looks like .ndo_xmit_xdp is missing!


Björn

> > > +   if (err)
> > > +           goto err_out;
> > > +
> > > +   err = xdp_rxq_info_reg_mem_model(&dring->xdp_rxq, 
> > > MEM_TYPE_PAGE_SHARED,
> > > +                                    NULL);
> > > +   if (err) {
> > > +           xdp_rxq_info_unreg(&dring->xdp_rxq);
> > > +           goto err_out;
> > > +   }
> > >
> > >     return 0;
> > >
> >
> >
> > --
> > Best regards,
> >   Jesper Dangaard Brouer
> >   MSc.CS, Principal Kernel Engineer at Red Hat
> >   LinkedIn: http://www.linkedin.com/in/brouer
>
>
> Thanks for looking at this
>
> /Ilias

Reply via email to