From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yuanhan Liu Subject: Re: [PATCH v3 12/12] net/virtio: add Tso support Date: Fri, 14 Oct 2016 00:05:51 +0800 Message-ID: <20161013160551.GB16751@yliu-dev.sh.intel.com> References: <1476368171-18176-1-git-send-email-olivier.matz@6wind.com> <1476368171-18176-13-git-send-email-olivier.matz@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, maxime.coquelin@redhat.com To: Olivier Matz , Thomas Monjalon Return-path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 8078858EB for ; Thu, 13 Oct 2016 18:04:57 +0200 (CEST) Content-Disposition: inline In-Reply-To: <1476368171-18176-13-git-send-email-olivier.matz@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 04:16:11PM +0200, Olivier Matz wrote: > +/* When doing TSO, the IP length is not included in the pseudo header > + * checksum of the packet given to the PMD, but for virtio it is > + * expected. > + */ > +static void > +virtio_tso_fix_cksum(struct rte_mbuf *m) > +{ > + /* common case: header is not fragmented */ > + if (likely(rte_pktmbuf_data_len(m) >= m->l2_len + m->l3_len + > + m->l4_len)) { > + struct ipv4_hdr *iph; > + struct ipv6_hdr *ip6h; > + struct tcp_hdr *th; > + uint16_t prev_cksum, new_cksum, ip_len, ip_paylen; > + uint32_t tmp; ... > + } else { As discussed just now, if you drop the else part, you could add my ACK for the whole virtio changes, and Review-ed by for all mbuf and other changes. Thoams, please pick them by youself directly: since it depends on other patches and they will be picked (or already be picked?) by you. Thanks. --yliu