From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v2 12/12] virtio: add Tso support Date: Fri, 14 Oct 2016 00:01:11 +0800 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 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 To: Olivier Matz 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) Content-Disposition: inline In-Reply-To: <3DAA9259-3C5F-43C3-B843-1270EDB09F33@6wind.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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