numam-dpdk/config
Tomasz Kulasek 4fb7e803eb ethdev: add Tx preparation
Added API for `rte_eth_tx_prepare`

uint16_t rte_eth_tx_prepare(uint8_t port_id, uint16_t queue_id,
	struct rte_mbuf **tx_pkts, uint16_t nb_pkts)

Added fields to the `struct rte_eth_desc_lim`:

	uint16_t nb_seg_max;
		/**< Max number of segments per whole packet. */

	uint16_t nb_mtu_seg_max;
		/**< Max number of segments per one MTU */

These fields can be used to create valid packets according to the
following rules:

 * For non-TSO packet, a single transmit packet may span up to
   "nb_mtu_seg_max" buffers.

 * For TSO packet the total number of data descriptors is "nb_seg_max",
   and each segment within the TSO may span up to "nb_mtu_seg_max".

Added functions:

int
rte_validate_tx_offload(struct rte_mbuf *m)

  to validate general requirements for tx offload set in mbuf of packet
  such a flag completness. In current implementation this function is
  called optionaly when RTE_LIBRTE_ETHDEV_DEBUG is enabled.

int rte_net_intel_cksum_prepare(struct rte_mbuf *m)

  to prepare pseudo header checksum for TSO and non-TSO tcp/udp packets
  before hardware tx checksum offload.
   - for non-TSO tcp/udp packets full pseudo-header checksum is
     counted and set.
   - for TSO the IP payload length is not included.

int
rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags)

  this function uses same logic as rte_net_intel_cksum_prepare, but
  allows application to choose which offloads should be taken into
  account, if full preparation is not required.

PERFORMANCE TESTS
-----------------

This feature was tested with modified csum engine from test-pmd.

The packet checksum preparation was moved from application to Tx
preparation step placed before burst.

We may expect some overhead costs caused by:
1) using additional callback before burst,
2) rescanning burst,
3) additional condition checking (packet validation),
4) worse optimization (e.g. packet data access, etc.)

We tested it using ixgbe Tx preparation implementation with some parts
disabled to have comparable information about the impact of different
parts of implementation.

IMPACT:

1) For unimplemented Tx preparation callback the performance impact is
   negligible,
2) For packet condition check without checksum modifications (nb_segs,
   available offloads, etc.) is 14626628/14252168 (~2.62% drop),
3) Full support in ixgbe driver (point 2 + packet checksum
   initialization) is 14060924/13588094 (~3.48% drop)

Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2017-01-04 20:40:15 +01:00
..
common_base ethdev: add Tx preparation 2017-01-04 20:40:15 +01:00
common_bsdapp config: remove EAL flags for OS environment 2016-03-05 11:09:31 +01:00
common_linuxapp net/virtio-user: add vhost-user adapter layer 2016-06-22 09:47:12 +02:00
defconfig_arm64-armv8a-linuxapp-gcc net/i40e: implement vector PMD for ARM 2016-10-26 19:38:00 +02:00
defconfig_arm64-dpaa2-linuxapp-gcc mk: introduce NXP dpaa2 architecture based on armv8-a 2016-05-18 16:28:45 +02:00
defconfig_arm64-thunderx-linuxapp-gcc net/thunderx: add PMD skeleton 2016-06-20 17:21:54 +02:00
defconfig_arm64-xgene1-linuxapp-gcc config: use armv8a as base for arm64 targets 2015-12-02 23:22:09 +01:00
defconfig_arm-armv7a-linuxapp-gcc config: disable qede for ARMv7 2016-05-13 17:38:08 +02:00
defconfig_i686-native-linuxapp-gcc crypto/zuc: add driver for ZUC library 2016-10-08 17:53:10 +02:00
defconfig_i686-native-linuxapp-icc crypto/zuc: add driver for ZUC library 2016-10-08 17:53:10 +02:00
defconfig_ppc_64-power8-linuxapp-gcc config: enable packet framework on ppc64le 2016-09-09 17:56:25 +02:00
defconfig_tile-tilegx-linuxapp-gcc mk: support native build on TILE-Gx 2016-03-16 15:24:38 +01:00
defconfig_x86_64-native-bsdapp-clang config: fix missing 64-bit flag on FreeBSD 2016-03-04 23:46:54 +01:00
defconfig_x86_64-native-bsdapp-gcc config: fix missing 64-bit flag on FreeBSD 2016-03-04 23:46:54 +01:00
defconfig_x86_64-native-linuxapp-clang config: add a common x86 flag 2016-02-11 12:45:31 +01:00
defconfig_x86_64-native-linuxapp-gcc config: add a common x86 flag 2016-02-11 12:45:31 +01:00
defconfig_x86_64-native-linuxapp-icc config: add a common x86 flag 2016-02-11 12:45:31 +01:00
defconfig_x86_x32-native-linuxapp-gcc config: add a common x86 flag 2016-02-11 12:45:31 +01:00