diff options
7 files changed, 318 insertions, 1 deletions
diff --git a/dpdk/Makefile b/dpdk/Makefile index e1aafcbb1fd..04ab94d3066 100644 --- a/dpdk/Makefile +++ b/dpdk/Makefile @@ -29,7 +29,7 @@ DPDK_TARBALL := dpdk-$(DPDK_VERSION).tar.gz DPDK_TAR_URL := $(DPDK_BASE_URL)/$(DPDK_TARBALL) DPDK_2.1.0_TARBALL_MD5_CKSUM := 205a0d12bfd6eb717d57506272f43519 DPDK_2.2.0_TARBALL_MD5_CKSUM := 22e2fd68cd5504f43fe9a5a6fd6dd938 -DPDK_16.04-rc4_TARBALL_MD5_CKSUM := 0de766a629999881e1c6e0de25d92bc0 +DPDK_16.04_TARBALL_MD5_CKSUM := 0728d506d7f56eb64233e824fa3c098a DPDK_SOURCE := $(B)/dpdk-$(DPDK_VERSION) DPDK_TARGET := x86_64-native-linuxapp-gcc JOBS := $(shell grep processor /proc/cpuinfo | wc -l) diff --git a/dpdk/dpdk-16.04_patches/0001-e1000-Set-VLAN-Rx-Offload-tag-correctly.patch b/dpdk/dpdk-16.04_patches/0001-e1000-Set-VLAN-Rx-Offload-tag-correctly.patch new file mode 100644 index 00000000000..044a4179003 --- /dev/null +++ b/dpdk/dpdk-16.04_patches/0001-e1000-Set-VLAN-Rx-Offload-tag-correctly.patch @@ -0,0 +1,75 @@ +From c085c9f9a7332c63d002169581edc89ef99fdbb1 Mon Sep 17 00:00:00 2001 +From: Damjan Marion <damarion@cisco.com> +Date: Wed, 16 Dec 2015 03:21:21 +0100 +Subject: [PATCH 1/6] e1000: Set VLAN Rx Offload tag correctly + +--- + drivers/net/e1000/igb_rxtx.c | 30 ++++++++++++++++++++++++++++++ + lib/librte_ether/rte_ether.h | 3 +++ + 2 files changed, 33 insertions(+) + +diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c +index 4a987e3..d6a4ce5 100644 +--- a/drivers/net/e1000/igb_rxtx.c ++++ b/drivers/net/e1000/igb_rxtx.c +@@ -904,6 +904,21 @@ eth_igb_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, + pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags(rxq, hlen_type_rss); + pkt_flags = pkt_flags | rx_desc_status_to_pkt_flags(staterr); + pkt_flags = pkt_flags | rx_desc_error_to_pkt_flags(staterr); ++ { ++ /* ++ * Check packet for VLAN ethernet types and set ++ * RX Offload flag PKT_RX_VLAN_PKT accordingly. ++ */ ++ struct ether_hdr *eth_hdr = ++ rte_pktmbuf_mtod(rxm, struct ether_hdr *); ++ u16 eth_type = rte_be_to_cpu_16(eth_hdr->ether_type); ++ ++ if ((eth_type == ETHER_TYPE_VLAN) || ++ (eth_type == ETHER_TYPE_VLAN_AD) || ++ (eth_type == ETHER_TYPE_VLAN_9100) || ++ (eth_type == ETHER_TYPE_VLAN_9200)) ++ pkt_flags |= PKT_RX_VLAN_PKT; ++ } + rxm->ol_flags = pkt_flags; + rxm->packet_type = igb_rxd_pkt_info_to_pkt_type(rxd.wb.lower. + lo_dword.hs_rss.pkt_info); +@@ -1140,6 +1155,21 @@ eth_igb_recv_scattered_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, + pkt_flags = rx_desc_hlen_type_rss_to_pkt_flags(rxq, hlen_type_rss); + pkt_flags = pkt_flags | rx_desc_status_to_pkt_flags(staterr); + pkt_flags = pkt_flags | rx_desc_error_to_pkt_flags(staterr); ++ { ++ /* ++ * Check packet for VLAN ethernet types and set ++ * RX Offload flag PKT_RX_VLAN_PKT accordingly. ++ */ ++ struct ether_hdr *eth_hdr = ++ rte_pktmbuf_mtod(rxm, struct ether_hdr *); ++ u16 eth_type = rte_be_to_cpu_16(eth_hdr->ether_type); ++ ++ if ((eth_type == ETHER_TYPE_VLAN) || ++ (eth_type == ETHER_TYPE_VLAN_AD) || ++ (eth_type == ETHER_TYPE_VLAN_9100) || ++ (eth_type == ETHER_TYPE_VLAN_9200)) ++ pkt_flags |= PKT_RX_VLAN_PKT; ++ } + first_seg->ol_flags = pkt_flags; + first_seg->packet_type = igb_rxd_pkt_info_to_pkt_type(rxd.wb. + lower.lo_dword.hs_rss.pkt_info); +diff --git a/lib/librte_ether/rte_ether.h b/lib/librte_ether/rte_ether.h +index 1d62d8e..341121a 100644 +--- a/lib/librte_ether/rte_ether.h ++++ b/lib/librte_ether/rte_ether.h +@@ -332,6 +332,9 @@ struct vxlan_hdr { + #define ETHER_TYPE_1588 0x88F7 /**< IEEE 802.1AS 1588 Precise Time Protocol. */ + #define ETHER_TYPE_SLOW 0x8809 /**< Slow protocols (LACP and Marker). */ + #define ETHER_TYPE_TEB 0x6558 /**< Transparent Ethernet Bridging. */ ++#define ETHER_TYPE_VLAN_AD 0x88a8 /**< IEEE 802.1AD VLAN tagging. */ ++#define ETHER_TYPE_VLAN_9100 0x9100 /**< VLAN 0x9100 tagging. */ ++#define ETHER_TYPE_VLAN_9200 0x9200 /**< VLAN 0x9200 tagging. */ + + #define ETHER_VXLAN_HLEN (sizeof(struct udp_hdr) + sizeof(struct vxlan_hdr)) + /**< VXLAN tunnel header length. */ +-- +2.7.4 + diff --git a/dpdk/dpdk-16.04_patches/0002-ixgbe-Wait-a-bit-longer-for-autonegotiation-to-leave.patch b/dpdk/dpdk-16.04_patches/0002-ixgbe-Wait-a-bit-longer-for-autonegotiation-to-leave.patch new file mode 100644 index 00000000000..4b385467359 --- /dev/null +++ b/dpdk/dpdk-16.04_patches/0002-ixgbe-Wait-a-bit-longer-for-autonegotiation-to-leave.patch @@ -0,0 +1,25 @@ +From 8e1be5044b5ee29c8cb3921051fb6d0722b60651 Mon Sep 17 00:00:00 2001 +From: Damjan Marion <damarion@cisco.com> +Date: Wed, 16 Dec 2015 03:22:11 +0100 +Subject: [PATCH 2/6] ixgbe: Wait a bit longer for autonegotiation to leave + +--- + drivers/net/ixgbe/base/ixgbe_82599.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/net/ixgbe/base/ixgbe_82599.c b/drivers/net/ixgbe/base/ixgbe_82599.c +index 154c1f1..817a8b5 100644 +--- a/drivers/net/ixgbe/base/ixgbe_82599.c ++++ b/drivers/net/ixgbe/base/ixgbe_82599.c +@@ -2470,7 +2470,7 @@ s32 ixgbe_reset_pipeline_82599(struct ixgbe_hw *hw) + IXGBE_WRITE_REG(hw, IXGBE_AUTOC, + autoc_reg ^ (0x4 << IXGBE_AUTOC_LMS_SHIFT)); + /* Wait for AN to leave state 0 */ +- for (i = 0; i < 10; i++) { ++ for (i = 0; i < 50; i++) { + msec_delay(4); + anlp1_reg = IXGBE_READ_REG(hw, IXGBE_ANLP1); + if (anlp1_reg & IXGBE_ANLP1_AN_STATE_MASK) +-- +2.7.4 + diff --git a/dpdk/dpdk-16.04_patches/0003-virtio-Cleanup-virtio-pmd-debug-log-output-reset.patch b/dpdk/dpdk-16.04_patches/0003-virtio-Cleanup-virtio-pmd-debug-log-output-reset.patch new file mode 100644 index 00000000000..8c53d0f11bb --- /dev/null +++ b/dpdk/dpdk-16.04_patches/0003-virtio-Cleanup-virtio-pmd-debug-log-output-reset.patch @@ -0,0 +1,65 @@ +From 1ee05e874eaa3f03ee7b5fbd6a32dff7304bd620 Mon Sep 17 00:00:00 2001 +From: Damjan Marion <damarion@cisco.com> +Date: Wed, 16 Dec 2015 03:29:22 +0100 +Subject: [PATCH 3/6] virtio: Cleanup virtio pmd debug log output, reset + +--- + drivers/net/virtio/virtio_ethdev.c | 5 ----- + drivers/net/virtio/virtio_rxtx.c | 4 +++- + 2 files changed, 3 insertions(+), 6 deletions(-) + +diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c +index 63a368a..ed4e757 100644 +--- a/drivers/net/virtio/virtio_ethdev.c ++++ b/drivers/net/virtio/virtio_ethdev.c +@@ -1405,18 +1405,13 @@ virtio_dev_link_update(struct rte_eth_dev *dev, __rte_unused int wait_to_complet + link.link_speed = SPEED_10G; + + if (vtpci_with_feature(hw, VIRTIO_NET_F_STATUS)) { +- PMD_INIT_LOG(DEBUG, "Get link status from hw"); + vtpci_read_dev_config(hw, + offsetof(struct virtio_net_config, status), + &status, sizeof(status)); + if ((status & VIRTIO_NET_S_LINK_UP) == 0) { + link.link_status = ETH_LINK_DOWN; +- PMD_INIT_LOG(DEBUG, "Port %d is down", +- dev->data->port_id); + } else { + link.link_status = ETH_LINK_UP; +- PMD_INIT_LOG(DEBUG, "Port %d is up", +- dev->data->port_id); + } + } else { + link.link_status = ETH_LINK_UP; +diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c +index ef21d8e..7fe14ad 100644 +--- a/drivers/net/virtio/virtio_rxtx.c ++++ b/drivers/net/virtio/virtio_rxtx.c +@@ -643,6 +643,7 @@ virtio_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) + rxm->next = NULL; + rxm->pkt_len = (uint32_t)(len[i] - hdr_size); + rxm->data_len = (uint16_t)(len[i] - hdr_size); ++ rxm->ol_flags = 0; + + if (hw->vlan_strip) + rte_vlan_strip(rxm); +@@ -760,6 +761,7 @@ virtio_recv_mergeable_pkts(void *rx_queue, + rxm->vlan_tci = 0; + rxm->pkt_len = (uint32_t)(len[0] - hdr_size); + rxm->data_len = (uint16_t)(len[0] - hdr_size); ++ rxm->ol_flags = 0; + + rxm->port = rxvq->port_id; + rx_pkts[nb_rx] = rxm; +@@ -863,7 +865,7 @@ virtio_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts) + if (unlikely(nb_pkts < 1)) + return nb_pkts; + +- PMD_TX_LOG(DEBUG, "%d packets to xmit", nb_pkts); ++ PMD_TX_LOG(DEBUG, "%d packets to xmit\n", nb_pkts); + nb_used = VIRTQUEUE_NUSED(txvq); + + virtio_rmb(); +-- +2.7.4 + diff --git a/dpdk/dpdk-16.04_patches/0004-mbuf-rearrange-rte_mbuf-metadata-to-suit-vpp.patch b/dpdk/dpdk-16.04_patches/0004-mbuf-rearrange-rte_mbuf-metadata-to-suit-vpp.patch new file mode 100644 index 00000000000..78d0c637562 --- /dev/null +++ b/dpdk/dpdk-16.04_patches/0004-mbuf-rearrange-rte_mbuf-metadata-to-suit-vpp.patch @@ -0,0 +1,83 @@ +From eed80f56477e26a5711ea3749d1881797b3c82a5 Mon Sep 17 00:00:00 2001 +From: Damjan Marion <damarion@cisco.com> +Date: Wed, 16 Dec 2015 04:25:23 +0100 +Subject: [PATCH 4/6] mbuf: rearrange rte_mbuf metadata to suit vpp + +--- + .../linuxapp/eal/include/exec-env/rte_kni_common.h | 5 +++-- + lib/librte_mbuf/rte_mbuf.h | 20 ++++++++++++-------- + 2 files changed, 15 insertions(+), 10 deletions(-) + +diff --git a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h +index 7e5e598..fdbeb4a 100644 +--- a/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h ++++ b/lib/librte_eal/linuxapp/eal/include/exec-env/rte_kni_common.h +@@ -118,11 +118,12 @@ struct rte_kni_mbuf { + char pad2[4]; + uint32_t pkt_len; /**< Total pkt len: sum of all segment data_len. */ + uint16_t data_len; /**< Amount of data in segment buffer. */ ++ char pad3[8]; ++ void *next; + + /* fields on second cache line */ +- char pad3[8] __attribute__((__aligned__(RTE_CACHE_LINE_MIN_SIZE))); ++ char pad4[16] __attribute__((__aligned__(RTE_CACHE_LINE_MIN_SIZE))); + void *pool; +- void *next; + }; + + /* +diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h +index 75a227d..ca4d0fb 100644 +--- a/lib/librte_mbuf/rte_mbuf.h ++++ b/lib/librte_mbuf/rte_mbuf.h +@@ -731,6 +731,12 @@ typedef uint64_t MARKER64[0]; /**< marker that allows us to overwrite 8 bytes + /** + * The generic rte_mbuf, containing a packet mbuf. + */ ++/* ++ * offload in the second cache line, next in the first. Better for vpp ++ * at least as of right now. ++ * If you change this structure, you must change the user-mode ++ * version in rte_mbuf.h ++ */ + struct rte_mbuf { + MARKER cacheline0; + +@@ -783,6 +789,12 @@ struct rte_mbuf { + uint32_t pkt_len; /**< Total pkt len: sum of all segments. */ + uint16_t data_len; /**< Amount of data in segment buffer. */ + uint16_t vlan_tci; /**< VLAN Tag Control Identifier (CPU order) */ ++ uint32_t seqn; /**< Sequence number. See also rte_reorder_insert() */ ++ uint16_t vlan_tci_outer; /**< Outer VLAN Tag Control Identifier (CPU order) */ ++ struct rte_mbuf *next; /**< Next segment of scattered packet. */ ++ ++ /* second cache line - fields only used in slow path or on TX */ ++ MARKER cacheline1 __rte_cache_min_aligned; + + union { + uint32_t rss; /**< RSS hash result if RSS enabled */ +@@ -806,20 +818,12 @@ struct rte_mbuf { + uint32_t usr; /**< User defined tags. See rte_distributor_process() */ + } hash; /**< hash information */ + +- uint32_t seqn; /**< Sequence number. See also rte_reorder_insert() */ +- +- uint16_t vlan_tci_outer; /**< Outer VLAN Tag Control Identifier (CPU order) */ +- +- /* second cache line - fields only used in slow path or on TX */ +- MARKER cacheline1 __rte_cache_min_aligned; +- + union { + void *userdata; /**< Can be used for external metadata */ + uint64_t udata64; /**< Allow 8-byte userdata on 32-bit */ + }; + + struct rte_mempool *pool; /**< Pool from which mbuf was allocated. */ +- struct rte_mbuf *next; /**< Next segment of scattered packet. */ + + /* fields to support TX offloads */ + union { +-- +2.7.4 + diff --git a/dpdk/dpdk-16.04_patches/0005-Allow-applications-to-override-rte_delay_us.patch b/dpdk/dpdk-16.04_patches/0005-Allow-applications-to-override-rte_delay_us.patch new file mode 100644 index 00000000000..8a32f6009ca --- /dev/null +++ b/dpdk/dpdk-16.04_patches/0005-Allow-applications-to-override-rte_delay_us.patch @@ -0,0 +1,43 @@ +From 3432c140c9c51e671a4d58bb428d5852426add1f Mon Sep 17 00:00:00 2001 +From: "Todd Foggoa (tfoggoa)" <tfoggoa@cisco.com> +Date: Wed, 3 Feb 2016 08:35:27 -0800 +Subject: [PATCH 5/6] Allow applications to override rte_delay_us() + +Some applications may wish to define their own implentation of +usec delay other than the existing blocking one. The default +behavior remains unchanged. + +Signed-off-by: Todd Foggoa (tfoggoa) <tfoggoa@cisco.com> +--- + lib/librte_eal/common/eal_common_timer.c | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + +diff --git a/lib/librte_eal/common/eal_common_timer.c b/lib/librte_eal/common/eal_common_timer.c +index c4227cd..cc26b91 100644 +--- a/lib/librte_eal/common/eal_common_timer.c ++++ b/lib/librte_eal/common/eal_common_timer.c +@@ -47,9 +47,21 @@ + /* The frequency of the RDTSC timer resolution */ + static uint64_t eal_tsc_resolution_hz; + ++/* Allow an override of the rte_delay_us function */ ++int rte_delay_us_override (unsigned us) __attribute__((weak)); ++ ++int ++rte_delay_us_override(__attribute__((unused)) unsigned us) ++{ ++ return 0; ++} ++ + void + rte_delay_us(unsigned us) + { ++ if (rte_delay_us_override(us)) ++ return; ++ + const uint64_t start = rte_get_timer_cycles(); + const uint64_t ticks = (uint64_t)us * rte_get_timer_hz() / 1E6; + while ((rte_get_timer_cycles() - start) < ticks) +-- +2.7.4 + diff --git a/dpdk/dpdk-16.04_patches/0006-Temporarily-disable-unthrottled-log-message.patch b/dpdk/dpdk-16.04_patches/0006-Temporarily-disable-unthrottled-log-message.patch new file mode 100644 index 00000000000..2241522612e --- /dev/null +++ b/dpdk/dpdk-16.04_patches/0006-Temporarily-disable-unthrottled-log-message.patch @@ -0,0 +1,26 @@ +From 454e25ed57c17ec18ee76ead4a75f9abdf579608 Mon Sep 17 00:00:00 2001 +From: Dave Barach <dave@barachs.net> +Date: Tue, 9 Feb 2016 10:22:39 -0500 +Subject: [PATCH 6/6] Temporarily disable unthrottled log message. + +Signed-off-by: Dave Barach <dave@barachs.net> +--- + lib/librte_eal/linuxapp/eal/eal_interrupts.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/lib/librte_eal/linuxapp/eal/eal_interrupts.c b/lib/librte_eal/linuxapp/eal/eal_interrupts.c +index 06b26a9..8d918a4 100644 +--- a/lib/librte_eal/linuxapp/eal/eal_interrupts.c ++++ b/lib/librte_eal/linuxapp/eal/eal_interrupts.c +@@ -711,6 +711,8 @@ eal_intr_process_interrupts(struct epoll_event *events, int nfds) + if (errno == EINTR || errno == EWOULDBLOCK) + continue; + ++ /* $$$ disable to avoid filling /var/log */ ++ if (0) + RTE_LOG(ERR, EAL, "Error reading from file " + "descriptor %d: %s\n", + events[n].data.fd, +-- +2.7.4 + |