From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <olivier.matz@6wind.com>
Received: from mail-wg0-f45.google.com (mail-wg0-f45.google.com [74.125.82.45])
 by dpdk.org (Postfix) with ESMTP id EC8AE595B
 for <dev@dpdk.org>; Fri, 14 Nov 2014 17:53:42 +0100 (CET)
Received: by mail-wg0-f45.google.com with SMTP id x12so20137634wgg.18
 for <dev@dpdk.org>; Fri, 14 Nov 2014 09:03:46 -0800 (PST)
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:in-reply-to
 :references:mime-version:content-type:content-transfer-encoding;
 bh=lUKCgh4A8JsaGGewryqg0LJngcbhrpOgpLPjgYqk1FA=;
 b=ejOskFGEXbkbjL/8Umt1MdipGLKMe1S/UZwzOZ0m/K6+kRAIPo3Mp/kSRzSQ9wdsEJ
 u95kLrexVFpQTuKVi2HCly9GkYjwPwHMQO743/jkSo6TM8Sqq0XL8KExDDIYMNoi+ncB
 lf5VcxJszGV7kLytqaAtyquWqtyMaElcdc2eq6LwZLXwxOp/IlxXtLxG5CJyuoEVnsb7
 8we/wOSiPQJXzrFMIy3GW6/mEq6wnCb+j0sGWcdu3fi23SaAGM9X8n6FQyTB10genOUj
 D/K06rYpz1yoC8rmGeqlueABuN8ETXAS7lOMPxvO/kvJ9AvbLCEalS32UYCdtVNkACYE
 jdew==
X-Gm-Message-State: ALoCoQntJcBt5Gbx/JkHvnhilhA6jVxp1gyNDjhYLs0CvZs2RGZg/J/GiWsXXj6dYSRsM/MUTIlM
X-Received: by 10.180.212.52 with SMTP id nh20mr9304694wic.2.1415984626560;
 Fri, 14 Nov 2014 09:03:46 -0800 (PST)
Received: from glumotte.dev.6wind.com (guy78-3-82-239-227-177.fbx.proxad.net.
 [82.239.227.177])
 by mx.google.com with ESMTPSA id cu9sm40352554wjb.0.2014.11.14.09.03.45
 for <multiple recipients>
 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128);
 Fri, 14 Nov 2014 09:03:46 -0800 (PST)
From: Olivier Matz <olivier.matz@6wind.com>
To: dev@dpdk.org
Date: Fri, 14 Nov 2014 18:03:16 +0100
Message-Id: <1415984609-2484-1-git-send-email-olivier.matz@6wind.com>
X-Mailer: git-send-email 2.1.0
In-Reply-To: <1415635166-1364-1-git-send-email-olivier.matz@6wind.com>
References: <1415635166-1364-1-git-send-email-olivier.matz@6wind.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Cc: jigsaw@gmail.com
Subject: [dpdk-dev] [PATCH v2 00/13] add TSO support
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: patches and discussions about DPDK <dev.dpdk.org>
List-Unsubscribe: <http://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <http://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Fri, 14 Nov 2014 16:53:43 -0000

This series add TSO support in ixgbe DPDK driver. This is a rework
of the series sent earlier this week [1]. This work is based on
another version [2] that was posted several months ago and
which included a mbuf rework that is now in mainline.

Changes in v2:

- move rte_get_rx_ol_flag_name() and rte_get_tx_ol_flag_name() in
  rte_mbuf.c, and fix comments
- use IGB_TX_OFFLOAD_MASK and IXGBE_TX_OFFLOAD_MASK to replace
  PKT_TX_OFFLOAD_MASK
- fix inner_l2_len and inner_l3_len bitfields: use uint64_t instead
  of uint16_t
- replace assignation of l2_len and l3_len by assignation of tx_offload.
  It now includes inner_l2_len and inner_l3_len at the same time.
- introduce a new cksum api in rte_ip.h following discussion with
  Konstantin
- reorder commits to have all TSO commits at the end of the series
- use ol_flags for phdr checksum calculation (this now matches ixgbe
  API: standard pseudo hdr cksum for TCP cksum offload, pseudo hdr
  cksum without ip paylen for TSO). This will probably be changed
  with a dev_prep_tx() like function for 2.0 release.
- rebase on latest head


This series first fixes some bugs that were discovered during the
development, adds some changes to the mbuf API (new l4_len and
tso_segsz fields), adds TSO support in ixgbe, reworks testpmd
csum forward engine, and finally adds TSO support in testpmd so it
can be validated.

The new fields added 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_TCP_CKSUM)
  - if it's IPv4, set the PKT_TX_IP_CKSUM flag and write the IP checksum
    to 0 in the packet
  - fill the mbuf offload information: l2_len, l3_len, l4_len, tso_segsz
  - calculate the pseudo header checksum and set it in the TCP header,
    as required when doing hardware TCP checksum offload

The test report will be added as an answer to this cover letter and
could be linked in the concerned commits.

[1] http://dpdk.org/ml/archives/dev/2014-November/007953.html
[2] http://dpdk.org/ml/archives/dev/2014-May/002537.html


Olivier Matz (13):
  igb/ixgbe: fix IP checksum calculation
  ixgbe: fix remaining pkt_flags variable size to 64 bits
  mbuf: move vxlan_cksum flag definition at the proper place
  mbuf: add help about TX checksum flags
  mbuf: remove too specific PKT_TX_OFFLOAD_MASK definition
  mbuf: add functions to get the name of an ol_flag
  testpmd: fix use of offload flags in testpmd
  testpmd: rework csum forward engine
  mbuf: introduce new checksum API
  mbuf: generic support for TCP segmentation offload
  ixgbe: support TCP segmentation offload
  testpmd: support TSO in csum forward engine
  testpmd: add a verbose mode csum forward engine

 app/test-pmd/cmdline.c              | 243 +++++++++--
 app/test-pmd/config.c               |  15 +-
 app/test-pmd/csumonly.c             | 806 ++++++++++++++++--------------------
 app/test-pmd/macfwd.c               |   5 +-
 app/test-pmd/macswap.c              |   5 +-
 app/test-pmd/rxonly.c               |  36 +-
 app/test-pmd/testpmd.c              |   2 +-
 app/test-pmd/testpmd.h              |  24 +-
 app/test-pmd/txonly.c               |   9 +-
 examples/ipv4_multicast/main.c      |   2 +-
 lib/librte_mbuf/rte_mbuf.c          |  46 ++
 lib/librte_mbuf/rte_mbuf.h          |  95 +++--
 lib/librte_net/rte_ip.h             | 204 +++++++++
 lib/librte_pmd_e1000/igb_rxtx.c     |  21 +-
 lib/librte_pmd_ixgbe/ixgbe_ethdev.c |   3 +-
 lib/librte_pmd_ixgbe/ixgbe_rxtx.c   | 178 +++++---
 lib/librte_pmd_ixgbe/ixgbe_rxtx.h   |  19 +-
 17 files changed, 1069 insertions(+), 644 deletions(-)

-- 
2.1.0