From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-we0-f174.google.com (mail-we0-f174.google.com [74.125.82.174]) by dpdk.org (Postfix) with ESMTP id 54ADB312 for ; Mon, 19 May 2014 14:47:02 +0200 (CEST) Received: by mail-we0-f174.google.com with SMTP id k48so5534511wev.33 for ; Mon, 19 May 2014 05:47:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=8TpQx3Ef85CDLV1o7bvGIoAUvnot+kgMPvM82H/6wxQ=; b=hiy50vfLjaYMXvkQIdw62/V5p1HcbUKzDcof7yd3lDB8EpFNAnT6aYbVh4M9UjOD8J 9GUxYWfdrwbjlH2vW9rGKphXo2M7j5sOS5h3BdF1Dd+q55tA6yndUpPcx3K2DIk6v9ds kC6QDMRLu3jIGbHNYI0D4GC6RCkk9HrbLRb4LMhqadTc0M2OeYhYKBnSB6uLr29lo12Y 7Dj287lDjYszQfGw2OsxGUTQKZO2NAwdRM/5OJGXpIC2ucRDQOg3ELjOCfifXRBS9tBa ab4KcmBe45yndMARWYFilF7liNK6Pf1BoHJOwIbUus8k50B6tJHvYiC3HyCgDOTag9b+ 1q8Q== X-Gm-Message-State: ALoCoQmtzFqEwtIH2k/AUgY1wl5jX9O+MRAa/JBVUOHI7GeIowhyHUna3j4MpcCzChbSqS/sBg5f X-Received: by 10.180.126.33 with SMTP id mv1mr12890111wib.6.1400503631064; Mon, 19 May 2014 05:47:11 -0700 (PDT) Received: from xps13.localnet (6wind.net2.nerim.net. [213.41.180.237]) by mx.google.com with ESMTPSA id j3sm14022873wjw.38.2014.05.19.05.47.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 19 May 2014 05:47:08 -0700 (PDT) From: Thomas Monjalon To: Olivier Matz Date: Mon, 19 May 2014 14:47:06 +0200 Message-ID: <1546716.3aIeLKqHAb@xps13> Organization: 6WIND User-Agent: KMail/4.13 (Linux/3.14.4-1-ARCH; KDE/4.13.0; x86_64; ; ) In-Reply-To: <1399647038-15095-1-git-send-email-olivier.matz@6wind.com> References: <1399647038-15095-1-git-send-email-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH RFC 00/11] ixgbe/mbuf: 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: Mon, 19 May 2014 12:47:02 -0000 2014-05-09 16:50, Olivier Matz: > This series add TSO support in ixgbe DPDK driver. As discussed > previously on the list [1], one problem is that there is not enough room > in rte_mbuf today to store the required information to implement this > feature: > - a new ol_flag > - the MSS > - the L4 header len > > A solution would be to increase the size of the mbuf to 2 cache lines > but it could have a bad impact on performance. This series proposes some > rework to drastically reduce the size of the rte_mbuf structures before > implementing the TSO, avoiding to change the mbuf size to 128 bytes. > > After the rework of mbuf structures, the size of rte_mbuf structure is > reduced by 9 bytes. The implementation of TSO requires to double the > size of ol_flags (16 to 32 bits) and to double the size of offload > information in order to add the mss and the l4 header length (32 to 64 > bits). At the end of the whole series, sizeof(rte_mbuf) is still 64 > bytes and 4 bytes are available for future use. > > This rework causes a lot of modifications in the mbuf structure, > implying some changes in the applications that directly use the mbuf > structure fields instead of using the API functions (sometimes there is > no function). That's why this series is a RFC. In my opinion, it's the > proper moment for this evolution as the 1.7.0 window is open. > > About TSO, the new fields in mbuf try to be generic enough to apply to > other hardware in the future. To delegate the TCP segmentation to the > hardware, the user has to: > > - set the PKT_TX_TCP_SEG flag in mbuf->ol_flags (this flag implies > PKT_TX_IP_CKSUM and PKT_TX_TCP_CKSUM) > - fill the mbuf->hw_offload information: l2_len, l3_len, l4_len, mss > - calculate the pseudo header checksum and set it in the TCP header, > as required when doing hardware TCP checksum offload > - set the IP checksum to 0 This patchset triggers a lot of interesting discussions about mbuf API, TSO and performance impacts. It seems everybody agree that having TSO support is a nice improvement and there are some discussions on how it can be even better. I feel we need a v2 from Olivier in order to allow us sending improvements patches on top of it. Thanks everyone -- Thomas