On Wed, 12 Sep 2018 12:02:38 +0300
Ilias Apalodimas <[email protected]> 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),
> + 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