Patch ENA PMD to skip setting tx flags in rx path 78/9878/3
authorMatthew Smith <mgsmith@netgate.com>
Mon, 18 Dec 2017 20:19:07 +0000 (14:19 -0600)
committerDamjan Marion <dmarion.lists@gmail.com>
Tue, 9 Jan 2018 20:22:14 +0000 (20:22 +0000)
On rx, the ENA PMD sets tx offload flags based on the
received packet's l4 protocol. This means you need
to turn off those offloads for every packet if you
encapsulate packets arriving on an interface using
that PMD. Disable this behavior.

Change-Id: Icae9f32e3d292d767da440ae5c1280902bdaa083
Signed-off-by: Matthew Smith <mgsmith@netgate.com>
dpdk/dpdk-17.11_patches/0001-ena-pmd-no-tx-flags.patch [new file with mode: 0644]
src/plugins/dpdk/device/format.c

diff --git a/dpdk/dpdk-17.11_patches/0001-ena-pmd-no-tx-flags.patch b/dpdk/dpdk-17.11_patches/0001-ena-pmd-no-tx-flags.patch
new file mode 100644 (file)
index 0000000..97dbadd
--- /dev/null
@@ -0,0 +1,21 @@
+diff --git a/drivers/net/ena/ena_ethdev.c b/drivers/net/ena/ena_ethdev.c
+index 22db895..6f982f6 100644
+--- a/drivers/net/ena/ena_ethdev.c
++++ b/drivers/net/ena/ena_ethdev.c
+@@ -261,16 +261,6 @@ static inline void ena_rx_mbuf_prepare(struct rte_mbuf *mbuf,
+ {
+       uint64_t ol_flags = 0;
+-      if (ena_rx_ctx->l4_proto == ENA_ETH_IO_L4_PROTO_TCP)
+-              ol_flags |= PKT_TX_TCP_CKSUM;
+-      else if (ena_rx_ctx->l4_proto == ENA_ETH_IO_L4_PROTO_UDP)
+-              ol_flags |= PKT_TX_UDP_CKSUM;
+-
+-      if (ena_rx_ctx->l3_proto == ENA_ETH_IO_L3_PROTO_IPV4)
+-              ol_flags |= PKT_TX_IPV4;
+-      else if (ena_rx_ctx->l3_proto == ENA_ETH_IO_L3_PROTO_IPV6)
+-              ol_flags |= PKT_TX_IPV6;
+-
+       if (unlikely(ena_rx_ctx->l4_csum_err))
+               ol_flags |= PKT_RX_L4_CKSUM_BAD;
+       if (unlikely(ena_rx_ctx->l3_csum_err))
index 8ea65c1..d9ee2bd 100644 (file)
@@ -726,7 +726,7 @@ format_dpdk_rte_mbuf (u8 * s, va_list * va)
   u32 indent = format_get_indent (s) + 2;
 
   s = format (s, "PKT MBUF: port %d, nb_segs %d, pkt_len %d"
-             "\n%Ubuf_len %d, data_len %d, ol_flags 0x%x, data_off %d, phys_addr 0x%x"
+             "\n%Ubuf_len %d, data_len %d, ol_flags 0x%lx, data_off %d, phys_addr 0x%x"
              "\n%Upacket_type 0x%x l2_len %u l3_len %u outer_l2_len %u outer_l3_len %u",
              mb->port, mb->nb_segs, mb->pkt_len,
              format_white_space, indent,