All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Qi Z" <qi.z.zhang@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"magnus.karlsson@intei.com" <magnus.karlsson@intei.com>,
	"Topel, Bjorn" <bjorn.topel@intel.com>
Subject: Re: [RFC 1/7] net/af_xdp: new PMD driver
Date: Thu, 1 Mar 2018 01:59:54 +0000	[thread overview]
Message-ID: <039ED4275CED7440929022BC67E706115315D3D0@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <20180228154522.2fa43379@xeon-e3>



> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Thursday, March 1, 2018 7:45 AM
> To: Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: dev@dpdk.org; magnus.karlsson@intei.com; Topel, Bjorn
> <bjorn.topel@intel.com>
> Subject: Re: [dpdk-dev] [RFC 1/7] net/af_xdp: new PMD driver
> 
> On Tue, 27 Feb 2018 17:33:00 +0800
> Qi Zhang <qi.z.zhang@intel.com> wrote:
> 
> > +
> > +static uint16_t
> > +eth_af_xdp_rx(void *queue, struct rte_mbuf **bufs, uint16_t nb_pkts)
> > +{
> > +	struct pmd_internals *internals = queue;
> > +	struct xdp_queue *rxq = &internals->rx;
> > +	struct rte_mbuf *mbuf;
> > +	unsigned long dropped = 0;
> > +	unsigned long rx_bytes = 0;
> > +	uint16_t count = 0;
> > +
> > +	nb_pkts = nb_pkts < ETH_AF_XDP_RX_BATCH_SIZE ?
> > +		  nb_pkts : ETH_AF_XDP_RX_BATCH_SIZE;
> > +
> 
> Put declarations first.
> Why not iterate if nb_pkts is huge?
Yes, it is not necessary to only read one batch, just for simple implementation, will be fixed.
> 
> > +	struct xdp_desc descs[ETH_AF_XDP_RX_BATCH_SIZE];
> > +	void *indexes[ETH_AF_XDP_RX_BATCH_SIZE];
> > +	int rcvd, i;
> > +	/* fill rx ring */
> > +	if (rxq->num_free >= ETH_AF_XDP_RX_BATCH_SIZE) {
> 
> Blank line after declarations before code please.

  reply	other threads:[~2018-03-01  2:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-27  9:32 [RFC 0/7] PMD driver for AF_XDP Qi Zhang
2018-02-27  9:33 ` [RFC 1/7] net/af_xdp: new PMD driver Qi Zhang
2018-02-28 23:40   ` Stephen Hemminger
2018-02-28 23:42   ` Stephen Hemminger
2018-03-01  1:51     ` Zhang, Qi Z
2018-02-28 23:42   ` Stephen Hemminger
2018-02-28 23:45   ` Stephen Hemminger
2018-03-01  1:59     ` Zhang, Qi Z [this message]
2018-02-27  9:33 ` [RFC 2/7] lib/mbuf: enable parse flags when create mempool Qi Zhang
2018-02-27  9:33 ` [RFC 3/7] lib/mempool: allow page size aligned mempool Qi Zhang
2018-02-27  9:33 ` [RFC 4/7] net/af_xdp: use mbuf mempool for buffer management Qi Zhang
2018-03-01  2:08   ` Stephen Hemminger
2018-02-27  9:33 ` [RFC 5/7] net/af_xdp: enable share mempool Qi Zhang
2018-02-27  9:33 ` [RFC 6/7] net/af_xdp: load BPF file Qi Zhang
2018-03-01  2:10   ` Stephen Hemminger
2018-02-27  9:33 ` [RFC 7/7] app/testpmd: enable parameter for mempool flags Qi Zhang
2018-03-01  2:52 ` [RFC 0/7] PMD driver for AF_XDP Jason Wang
2018-03-01  4:18   ` Zhang, Qi Z
2018-03-01  4:20     ` Zhang, Qi Z
2018-03-01  7:46       ` Jason Wang
2018-03-01 12:56         ` Zhang, Qi Z
2018-03-01 13:18           ` Jason Wang
2018-03-02  4:05             ` Zhang, Qi Z
2018-02-27  9:35 Qi Zhang
2018-02-27  9:35 ` [RFC 1/7] net/af_xdp: new PMD driver Qi Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=039ED4275CED7440929022BC67E706115315D3D0@SHSMSX103.ccr.corp.intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=bjorn.topel@intel.com \
    --cc=dev@dpdk.org \
    --cc=magnus.karlsson@intei.com \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.