numam-dpdk/examples
Olivier Matz 4199fdea60 mbuf: generic support for TCP segmentation offload
Some of the NICs supported by DPDK have a possibility to accelerate TCP
traffic by using segmentation offload. The application prepares a packet
with valid TCP header with size up to 64K and deleguates the
segmentation to the NIC.

Implement the generic part of TCP segmentation offload in rte_mbuf. It
introduces 2 new fields in rte_mbuf: l4_len (length of L4 header in bytes)
and tso_segsz (MSS of packets).

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)
- set the flag PKT_TX_IPV4 or PKT_TX_IPV6
- set PKT_TX_IP_CKSUM if it's IPv4, and set 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 without taking ip_len in account,
  and set it in the TCP header, for instance by using
  rte_ipv4_phdr_cksum(ip_hdr, ol_flags)

The API is inspired from ixgbe hardware (the next commit adds the
support for ixgbe), but it seems generic enough to be used for other
hw/drivers in the future.

This commit also reworks the way l2_len and l3_len are used in igb
and ixgbe drivers as the l2_l3_len is not available anymore in mbuf.

Signed-off-by: Mirek Walukiewicz <miroslaw.walukiewicz@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2014-11-26 19:35:56 +01:00
..
cmdline eal: deprecate rte_snprintf 2014-06-27 02:31:24 +02:00
distributor examples/distributor: new sample app 2014-11-16 22:54:56 +01:00
dpdk_qat examples/dpdk_qat: fix reference to old mbuf field 2014-11-24 13:17:49 +01:00
exception_path app,examples: remove references to drivers config 2014-11-10 10:07:56 +01:00
helloworld remove trailing whitespaces 2014-06-11 00:29:34 +02:00
ip_fragmentation ether: new function to format mac address 2014-11-13 00:48:16 +01:00
ip_pipeline examples: do not probe pci twice 2014-09-29 13:08:53 +02:00
ip_reassembly ether: new function to format mac address 2014-11-13 00:48:16 +01:00
ipv4_multicast mbuf: generic support for TCP segmentation offload 2014-11-26 19:35:56 +01:00
kni app,examples: remove references to drivers config 2014-11-10 10:07:56 +01:00
l2fwd examples: use factorized default Rx/Tx configuration 2014-10-10 13:01:49 +02:00
l2fwd-ivshmem examples: use factorized default Rx/Tx configuration 2014-10-10 13:01:49 +02:00
l3fwd ether: new function to format mac address 2014-11-13 00:48:16 +01:00
l3fwd-acl ether: new function to format mac address 2014-11-13 00:48:16 +01:00
l3fwd-power ether: new function to format mac address 2014-11-13 00:48:16 +01:00
l3fwd-vf ether: new function to format mac address 2014-11-13 00:48:16 +01:00
link_status_interrupt examples: use factorized default Rx/Tx configuration 2014-10-10 13:01:49 +02:00
load_balancer examples: use factorized default Rx/Tx configuration 2014-10-10 13:01:49 +02:00
multi_process examples: use factorized default Rx/Tx configuration 2014-10-10 13:01:49 +02:00
netmap_compat examples: use factorized default Rx/Tx configuration 2014-10-10 13:01:49 +02:00
qos_meter examples: use factorized default Rx/Tx configuration 2014-10-10 13:01:49 +02:00
qos_sched examples: do not probe pci twice 2014-09-29 13:08:53 +02:00
quota_watermark examples: use factorized default Rx/Tx configuration 2014-10-10 13:01:49 +02:00
skeleton examples/skeleton: very simple code for packet forwarding 2014-11-26 17:27:03 +01:00
timer remove trailing whitespaces 2014-06-11 00:29:34 +02:00
vhost vhost: enable promiscuous and multicast 2014-11-12 00:10:23 +01:00
vhost_xen examples: use factorized default Rx/Tx configuration 2014-10-10 13:01:49 +02:00
vm_power_manager examples/vm_power: cli in guest 2014-11-26 17:27:03 +01:00
vmdq examples/vmdq: fix code style 2014-11-11 23:48:05 +01:00
vmdq_dcb examples: use factorized default Rx/Tx configuration 2014-10-10 13:01:49 +02:00
Makefile examples/vm_power: vm power management application 2014-11-26 17:27:03 +01:00