aboutsummaryrefslogtreecommitdiffstats
path: root/dpdk/dpdk-2.2.0_patches
diff options
context:
space:
mode:
Diffstat (limited to 'dpdk/dpdk-2.2.0_patches')
-rw-r--r--dpdk/dpdk-2.2.0_patches/0008-Add-missing-init-of-packet_type-field.patch70
1 files changed, 70 insertions, 0 deletions
diff --git a/dpdk/dpdk-2.2.0_patches/0008-Add-missing-init-of-packet_type-field.patch b/dpdk/dpdk-2.2.0_patches/0008-Add-missing-init-of-packet_type-field.patch
new file mode 100644
index 00000000000..9c65330da7f
--- /dev/null
+++ b/dpdk/dpdk-2.2.0_patches/0008-Add-missing-init-of-packet_type-field.patch
@@ -0,0 +1,70 @@
+From 9a2515d7157271bac2bd5cd49758dbf3eb2b43b6 Mon Sep 17 00:00:00 2001
+From: Bud Grise <griseb@cisco.com>
+Date: Mon, 1 Feb 2016 14:28:01 -0500
+Subject: [PATCH 8/8] Add missing init of packet_type field.
+
+This can cause packets to be mishandled in systems with more than
+one type of driver in use.
+
+Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com>
+---
+ drivers/net/e1000/em_rxtx.c | 2 ++
+ drivers/net/virtio/virtio_rxtx.c | 2 ++
+ drivers/net/vmxnet3/vmxnet3_rxtx.c | 1 +
+ 3 files changed, 5 insertions(+)
+
+diff --git a/drivers/net/e1000/em_rxtx.c b/drivers/net/e1000/em_rxtx.c
+index d8fb252..8796c8a 100644
+--- a/drivers/net/e1000/em_rxtx.c
++++ b/drivers/net/e1000/em_rxtx.c
+@@ -799,6 +799,7 @@ eth_em_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+ rxm->ol_flags = rx_desc_status_to_pkt_flags(status);
+ rxm->ol_flags = rxm->ol_flags |
+ rx_desc_error_to_pkt_flags(rxd.errors);
++ rxm->packet_type = RTE_PTYPE_UNKNOWN;
+
+ /* Only valid if PKT_RX_VLAN_PKT set in pkt_flags */
+ rxm->vlan_tci = rte_le_to_cpu_16(rxd.special);
+@@ -1025,6 +1026,7 @@ eth_em_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts,
+ first_seg->ol_flags = rx_desc_status_to_pkt_flags(status);
+ first_seg->ol_flags = first_seg->ol_flags |
+ rx_desc_error_to_pkt_flags(rxd.errors);
++ first_seg->packet_type = RTE_PTYPE_UNKNOWN;
+
+ /* Only valid if PKT_RX_VLAN_PKT set in pkt_flags */
+ rxm->vlan_tci = rte_le_to_cpu_16(rxd.special);
+diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
+index e4bf9b7..e605c85 100644
+--- a/drivers/net/virtio/virtio_rxtx.c
++++ b/drivers/net/virtio/virtio_rxtx.c
+@@ -605,6 +605,7 @@ virtio_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+ rxm->pkt_len = (uint32_t)(len[i] - hdr_size);
+ rxm->data_len = (uint16_t)(len[i] - hdr_size);
+ rxm->ol_flags = 0;
++ rxm->packet_type = RTE_PTYPE_UNKNOWN;
+
+ if (hw->vlan_strip)
+ rte_vlan_strip(rxm);
+@@ -726,6 +727,7 @@ virtio_recv_mergeable_pkts(void *rx_queue,
+ rxm->pkt_len = (uint32_t)(len[0] - hdr_size);
+ rxm->data_len = (uint16_t)(len[0] - hdr_size);
+ rxm->ol_flags = 0;
++ rxm->packet_type = RTE_PTYPE_UNKNOWN;
+
+ rxm->port = rxvq->port_id;
+ rx_pkts[nb_rx] = rxm;
+diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
+index 4de5d89..c76b230 100644
+--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
++++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
+@@ -640,6 +640,7 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
+ rxm->data_off = RTE_PKTMBUF_HEADROOM;
+ rxm->ol_flags = 0;
+ rxm->vlan_tci = 0;
++ rxm->packet_type = RTE_PTYPE_UNKNOWN;
+
+ vmxnet3_rx_offload(rcd, rxm);
+
+--
+2.2.1
+