From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ilias Apalodimas Subject: Re: [net-next, PATCH 2/2, v2] net: socionext: add XDP support Date: Wed, 12 Sep 2018 12:20:12 +0300 Message-ID: <20180912092012.GA31360@apalos> References: <1536742958-29887-1-git-send-email-ilias.apalodimas@linaro.org> <1536742958-29887-3-git-send-email-ilias.apalodimas@linaro.org> <20180912111457.0121d9f3@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, jaswinder.singh@linaro.org, ard.biesheuvel@linaro.org, masami.hiramatsu@linaro.org, arnd@arndb.de, mykyta.iziumtsev@linaro.org, bjorn.topel@intel.com, magnus.karlsson@intel.com, daniel@iogearbox.net, ast@kernel.org To: Jesper Dangaard Brouer Return-path: Received: from mail-wr1-f66.google.com ([209.85.221.66]:40434 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726800AbeILOX4 (ORCPT ); Wed, 12 Sep 2018 10:23:56 -0400 Received: by mail-wr1-f66.google.com with SMTP id n2-v6so1211605wrw.7 for ; Wed, 12 Sep 2018 02:20:17 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20180912111457.0121d9f3@redhat.com> Sender: netdev-owner@vger.kernel.org List-ID: 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 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) > > + 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