All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yang, Zhiyong" <zhiyong.yang@intel.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	"thomas@monjalon.net" <thomas@monjalon.net>,
	"Yigit, Ferruh" <ferruh.yigit@intel.com>
Subject: Re: [PATCH] librte_mbuf: modify the port initialization value
Date: Tue, 5 Sep 2017 04:28:14 +0000	[thread overview]
Message-ID: <E182254E98A5DA4EB1E657AC7CB9BD2A8AF0DE17@BGSMSX101.gar.corp.intel.com> (raw)
In-Reply-To: <20170904203959.727ea76a@xeon-e3>

Hi, Stephen:

> -----Original Message-----
> From: Stephen Hemminger [mailto:stephen@networkplumber.org]
> Sent: Tuesday, September 5, 2017 11:40 AM
> To: Yang, Zhiyong <zhiyong.yang@intel.com>
> Cc: dev@dpdk.org; thomas@monjalon.net; Yigit, Ferruh <ferruh.yigit@intel.com>
> Subject: Re: [dpdk-dev] [PATCH] librte_mbuf: modify the port initialization value
> 
> > @@ -144,7 +144,7 @@ rte_pktmbuf_init(struct rte_mempool *mp,
> >  	/* init some constant fields */
> >  	m->pool = mp;
> >  	m->nb_segs = 1;
> > -	m->port = 0xff;
> > +	m->port = 0xffff;
> >  	rte_mbuf_refcnt_set(m, 1);
> >  	m->next = NULL;
> >  }
> > diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h
> > index eaed7eee0..cdc70aa83 100644
> > --- a/lib/librte_mbuf/rte_mbuf.h
> > +++ b/lib/librte_mbuf/rte_mbuf.h
> > @@ -1095,7 +1095,7 @@ static inline void rte_pktmbuf_reset(struct rte_mbuf
> *m)
> >  	m->vlan_tci = 0;
> >  	m->vlan_tci_outer = 0;
> >  	m->nb_segs = 1;
> > -	m->port = 0xff;
> > +	m->port = 0xffff;
> >
> >  	m->ol_flags = 0;
> >  	m->packet_type = 0;
> 
> Maybe introduce MBUF_INVALID_PORT as a constant?
> 
> #define MBUF_INVALID_PORT  0xffff

Make sense.  Thanks for your suggestion.

Thanks
Zhiyong

  reply	other threads:[~2017-09-05  4:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-04  6:55 [PATCH] librte_mbuf: modify the port initialization value Zhiyong Yang
2017-09-05  3:39 ` Stephen Hemminger
2017-09-05  4:28   ` Yang, Zhiyong [this message]
2017-09-05  5:13 ` [PATCH v2] librte_mbuf: modify " Zhiyong Yang
2017-09-05  5:20   ` Zhang, Helin
2017-09-06  0:42     ` Yang, Zhiyong
2017-09-05  7:28   ` Thomas Monjalon
2017-09-05 12:30     ` Yang, Zhiyong

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=E182254E98A5DA4EB1E657AC7CB9BD2A8AF0DE17@BGSMSX101.gar.corp.intel.com \
    --to=zhiyong.yang@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=stephen@networkplumber.org \
    --cc=thomas@monjalon.net \
    /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.