From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id B725B1B352 for ; Thu, 9 Nov 2017 21:28:46 +0100 (CET) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Nov 2017 12:28:45 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.44,370,1505804400"; d="scan'208";a="254859" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.241.224.59]) ([10.241.224.59]) by FMSMGA003.fm.intel.com with ESMTP; 09 Nov 2017 12:28:45 -0800 To: Ilya Matveychikov , dev@dpdk.org References: From: Ferruh Yigit Message-ID: <7aea89a4-40b2-876e-baa3-004b8c2ac791@intel.com> Date: Thu, 9 Nov 2017 12:28:44 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH] examples: fix for incomplete nb_segs type change X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Nov 2017 20:28:47 -0000 On 11/9/2017 5:55 AM, Ilya Matveychikov wrote: > Fixes: 97cb466d ("mbuf: use 2 bytes for port and nb segments") Fixline format we are using is slightly different, there is an alias to use: http://dpdk.org/doc/guides/contributing/patches.html git config alias.fixline "log -1 --abbrev=12 --format='Fixes: %h (\"%s\")%nCc: %ae'" > Signed-off-by: Ilya V. Matveychikov > --- > doc/guides/sample_app_ug/ipv4_multicast.rst | 2 +- > examples/ipv4_multicast/main.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/doc/guides/sample_app_ug/ipv4_multicast.rst b/doc/guides/sample_app_ug/ipv4_multicast.rst > index 49712a0..9f50e32 100644 > --- a/doc/guides/sample_app_ug/ipv4_multicast.rst > +++ b/doc/guides/sample_app_ug/ipv4_multicast.rst > @@ -364,7 +364,7 @@ It is the mcast_out_pkt() function that performs the packet duplication (either > /* update header's fields */ > > hdr->pkt.pkt_len = (uint16_t)(hdr->pkt.data_len + pkt->pkt.pkt_len); > - hdr->pkt.nb_segs = (uint8_t)(pkt->pkt.nb_segs + 1); > + hdr->pkt.nb_segs = (uint16_t)(pkt->pkt.nb_segs + 1); This is the side effect of putting code into document, code changes... > > /* copy metadata from source packet */ > > diff --git a/examples/ipv4_multicast/main.c b/examples/ipv4_multicast/main.c > index 9a13d35..1a82bc0 100644 > --- a/examples/ipv4_multicast/main.c > +++ b/examples/ipv4_multicast/main.c > @@ -291,7 +291,7 @@ mcast_out_pkt(struct rte_mbuf *pkt, int use_clone) > > /* update header's fields */ > hdr->pkt_len = (uint16_t)(hdr->data_len + pkt->pkt_len); > - hdr->nb_segs = (uint8_t)(pkt->nb_segs + 1); > + hdr->nb_segs = (uint16_t)(pkt->nb_segs + 1); Do we need the cast at all? > > /* copy metadata from source packet*/ > hdr->port = pkt->port; > -- > 2.7.4 >