Skip to content

enhance tx checksum offload API

Olivier Matz dpdk-dev 3 versions – Applied

Status from this message: Applied, thanks for making API clearer

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest20 patches 2 repliesApplied
  2. v220 patches 13 repliesSuperseded
  3. v120 patches 6 repliesSuperseded

Changes in v3 from the cover letter

- more detailed API comments for PKT_TX_IPV4 and PKT_TX_IPV6
- do not calculate the outer UDP checksum if packet is not UDP
- add a likely() in i40e
- remove a unlikely() in i40e
- fix a patch split issue
- rebase on head

Patches in v3 Applied

#Subject and filesSizeRepliesApplied
1/20mbuf: remove PKT_TX_IPV4_CSUMlib/librte_mbuf/rte_mbuf.h lib/librte_pmd_i40e/i40e_rxtx.c+1 -20 replies
2/20mbuf: enhance the API documentation of offload flagsapp/test-pmd/csumonly.c lib/librte_mbuf/rte_mbuf.h+41 -100 replies
3/20i40e: call i40e_txd_enable_checksum only for offloaded packetslib/librte_pmd_i40e/i40e_rxtx.c+11 -40 replies
4/20i40e: remove the use of PKT_TX_UDP_TUNNEL_PKT flaglib/librte_pmd_i40e/i40e_rxtx.c+2 -40 replies
5/20mbuf: remove PKT_TX_UDP_TUNNEL_PKT flagapp/test-pmd/csumonly.c lib/librte_mbuf/rte_mbuf.c lib/librte_mbuf/rte_mbuf.h +1 more+2 -100 replies
6/20testpmd: replace tx_checksum command by csumapp/test-pmd/cmdline.c+35 -350 replies
7/20testpmd: move csum_show in a functionapp/test-pmd/cmdline.c+45 -370 replies
8/20testpmd: add csum parse_tunnel commandapp/test-pmd/cmdline.c app/test-pmd/csumonly.c app/test-pmd/testpmd.h+72 -20 replies
9/20testpmd: rename vxlan in outer_ip in csum commandsapp/test-pmd/cmdline.c app/test-pmd/csumonly.c app/test-pmd/testpmd.h+24 -210 replies
10/20testpmd: introduce parse_ipv* in csum fwd engineapp/test-pmd/csumonly.c+39 -120 replies
11/20testpmd: use a structure to store offload info in csum fwd engineapp/test-pmd/csumonly.c+115 -1070 replies
12/20testpmd: introduce parse_vxlan in csum fwd engineapp/test-pmd/csumonly.c+37 -310 replies
13/20testpmd: support gre tunnels in csum fwd engineapp/test-pmd/cmdline.c app/test-pmd/csumonly.c+87 -100 replies
14/20testpmd: support ipip tunnel in csum forward engineapp/test-pmd/cmdline.c app/test-pmd/csumonly.c+35 -10 replies
15/20ethdev: add outer IP offload capability flaglib/librte_ether/rte_ethdev.h+1 -00 replies
16/20i40e: advertise outer IPv4 checksum capabilitylib/librte_pmd_i40e/i40e_ethdev.c+2 -10 replies
17/20testpmd: add a warning if outer ip cksum requested but not supportedapp/test-pmd/cmdline.c+5 -10 replies
18/20testpmd: fix TSO when using outer checksum offloadsapp/test-pmd/csumonly.c+1 -00 replies
19/20i40e: fix offloading of outer checksum for ip in ip tunnelslib/librte_pmd_i40e/i40e_rxtx.c+0 -100 replies
20/20i40e: add debug logs for tx context descriptorslib/librte_pmd_i40e/i40e_rxtx.c+22 -00 replies

Reviews trailers per patch

2 of 20 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchOlivier MatzJijiang Liu
SeriesA-b
1/20
2/20
3/20
4/20
5/20
6/20
7/20
8/20
9/20
10/20
11/20
12/20
13/20
14/20
15/20A-b
16/20A-b
17/20
18/20Pointed-out-by
19/20
20/20

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH v3 00/20] enhance tx checksum offload API

The goal of this series is to clarify and simplify the mbuf offload API.

- simplify the definitions of PKT_TX_IP_CKSUM and PKT_TX_IPV4, each flag has now only one meaning. No impact on the code.

- add a feature flag for OUTER_IP_CHECKSUM (from Jijiang's patches)

- remove the PKT_TX_UDP_TUNNEL_PKT flag: it is useless from an API point of view. It was added because i40e need this info for some reason. We have 3 solutions:

- remove the flag and adapt the driver to the API (the choice I made for this series).

- remove the flag and stop advertising OUTER_IP_CHECKSUM in i40e

- keep this flag, penalizing performance of drivers that do not require the flag. It would also mean that drivers won't support outer IP checksum for all tunnel types, but only for the tunnel types having a flag.

- a side effect of this API clarification is that there is only one way for doing one operation. If the hardware has several ways to do the same operation, a choice has to be made in the driver.

The series also provide some enhancements and fixes related to this API rework:

- new tunnel types to testpmd csum forward engine.
- fixes in i40e to adapt to new api and support more tunnel types.

[1] http://dpdk.org/ml/archives/dev/2015-January/011127.html

Changes in v2:
- fix test of rx offload flag in parse_vlan() pointed out by Jijiang

Changes in v3:
- more detailed API comments for PKT_TX_IPV4 and PKT_TX_IPV6
- do not calculate the outer UDP checksum if packet is not UDP
- add a likely() in i40e
- remove a unlikely() in i40e
- fix a patch split issue
- rebase on head

Jijiang Liu (2):
ethdev: add outer IP offload capability flag
i40e: advertise outer IPv4 checksum capability

Olivier Matz (18):
mbuf: remove PKT_TX_IPV4_CSUM
mbuf: enhance the API documentation of offload flags
i40e: call i40e_txd_enable_checksum only for offloaded packets
i40e: remove the use of PKT_TX_UDP_TUNNEL_PKT flag
mbuf: remove PKT_TX_UDP_TUNNEL_PKT flag
testpmd: replace tx_checksum command by csum
testpmd: move csum_show in a function
testpmd: add csum parse_tunnel command
testpmd: rename vxlan in outer_ip in csum commands
testpmd: introduce parse_ipv* in csum fwd engine
testpmd: use a structure to store offload info in csum fwd engine
testpmd: introduce parse_vxlan in csum fwd engine
testpmd: support gre tunnels in csum fwd engine
testpmd: support ipip tunnel in csum forward engine
testpmd: add a warning if outer ip cksum requested but not supported
testpmd: fix TSO when using outer checksum offloads
i40e: fix offloading of outer checksum for ip in ip tunnels
i40e: add debug logs for tx context descriptors

 app/test-pmd/cmdline.c            | 234 ++++++++++++++-------
 app/test-pmd/csumonly.c           | 425 ++++++++++++++++++++++++++------------
 app/test-pmd/testpmd.h            |   9 +-
 lib/librte_ether/rte_ethdev.h     |   1 +
 lib/librte_mbuf/rte_mbuf.c        |   1 -
 lib/librte_mbuf/rte_mbuf.h        |  51 +++--
 lib/librte_pmd_i40e/i40e_ethdev.c |   3 +-
 lib/librte_pmd_i40e/i40e_rxtx.c   |  55 +++--
 8 files changed, 529 insertions(+), 250 deletions(-)
Signature · 1 line
2.1.4