From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 1914B7E24 for ; Thu, 13 Oct 2016 18:00:17 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga105.jf.intel.com with ESMTP; 13 Oct 2016 09:00:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,340,1473145200"; d="scan'208";a="1044254490" Received: from yliu-dev.sh.intel.com (HELO yliu-dev) ([10.239.67.162]) by orsmga001.jf.intel.com with ESMTP; 13 Oct 2016 09:00:14 -0700 Date: Fri, 14 Oct 2016 00:01:11 +0800 From: Yuanhan Liu To: Olivier Matz Cc: dev@dpdk.org, konstantin.ananyev@intel.com, sugesh.chandran@intel.com, bruce.richardson@intel.com, jianfeng.tan@intel.com, helin.zhang@intel.com, adrien.mazarguil@6wind.com, stephen@networkplumber.org, dprovan@bivio.net, xiao.w.wang@intel.com, thoams@yliu-dev.sh.intel.com Message-ID: <20161013160111.GA16751@yliu-dev.sh.intel.com> References: <1475485223-30566-1-git-send-email-olivier.matz@6wind.com> <1475485223-30566-13-git-send-email-olivier.matz@6wind.com> <20161013081839.GT16751@yliu-dev.sh.intel.com> <57FF9409.2090205@6wind.com> <20161013141654.GW16751@yliu-dev.sh.intel.com> <57FF9FA9.8020403@6wind.com> <20161013150107.GX16751@yliu-dev.sh.intel.com> <57FFA50C.6030805@6wind.com> <20161013152935.GZ16751@yliu-dev.sh.intel.com> <3DAA9259-3C5F-43C3-B843-1270EDB09F33@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3DAA9259-3C5F-43C3-B843-1270EDB09F33@6wind.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [dpdk-dev] [PATCH v2 12/12] virtio: add Tso support X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Oct 2016 16:00:18 -0000 On Thu, Oct 13, 2016 at 05:45:21PM +0200, Olivier Matz wrote: > >> If you have a packet split like this: > >> > >> mbuf segment 1 mbuf segment 2 > >> ---------------------------- ------------------------------ > >> | Ethernet header | IP hea| |der | TCP header | data > >> ---------------------------- ------------------------------ > >> ^ > >> iph > > > >Thanks, that's clear. How could you be able to access the tcp header > >from the first mbuf then? I mean, how is the following code supposed > >to work? > > > > prev_cksum.u8[0] = *rte_pktmbuf_mtod_offset(m, uint8_t *, > > m->l2_len + m->l3_len + 16); > > > > Oh I see... Sorry there was a confusion on my side with another (internal) macro that browses the segments if the offset ils not in the first one. > > If you agree, let's add the code without the else part, I'll fix it for the rc2. Good. That's okay to me. --yliu