diff options
author | Damjan Marion <damarion@cisco.com> | 2016-06-07 12:46:55 +0200 |
---|---|---|
committer | Dave Barach <openvpp@barachs.net> | 2016-06-07 16:34:44 +0000 |
commit | 19414deeaa15ea9434f86d40a5bc7ca43916eab5 (patch) | |
tree | acdb991d5696686abd5d082dee30eaef110577a0 /dpdk | |
parent | 3ef822e1c3eedef8dd3cd95a000a012667641f37 (diff) |
Rebase DPDK patches
Change-Id: I3ef9faceb085bd06b55e3ba7800389eaae56177a
Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'dpdk')
-rw-r--r-- | dpdk/dpdk-16.04_patches/0009-enic-fix-imissed-to-count-drops-due-to-lack-of-RX-bu.patch (renamed from dpdk/dpdk-16.04_patches/0009-enic-fix-imissed-rx-counter.patch) | 10 | ||||
-rw-r--r-- | dpdk/dpdk-16.04_patches/0011-enic-fix-misalignment-of-Rx-mbuf-data.patch | 10 | ||||
-rw-r--r-- | dpdk/dpdk-16.04_patches/0012-enic-Optimization-of-Tx-path-to-reduce-Host-CPU-over.patch | 18 | ||||
-rwxr-xr-x | dpdk/dpdk-16.04_patches/0013-Revert-ixgbe-fix-packet-type-from-vector-Rx.patch | 8 | ||||
-rw-r--r--[-rwxr-xr-x] | dpdk/dpdk-16.04_patches/0015-ENIC-counter-improvement.patch (renamed from dpdk/dpdk-16.04_patches/0015-enic-counter_improvement.patch) | 53 | ||||
-rw-r--r--[-rwxr-xr-x] | dpdk/dpdk-16.04_patches/0016-ENIC-scatter-RX.patch (renamed from dpdk/dpdk-16.04_patches/0016-enic-scatter-rx.patch) | 130 | ||||
-rw-r--r--[-rwxr-xr-x] | dpdk/dpdk-16.04_patches/0017-i40e-Set-PKT_RX_VLAN_PKT-flag-for-VLAN-packets.patch | 10 |
7 files changed, 139 insertions, 100 deletions
diff --git a/dpdk/dpdk-16.04_patches/0009-enic-fix-imissed-rx-counter.patch b/dpdk/dpdk-16.04_patches/0009-enic-fix-imissed-to-count-drops-due-to-lack-of-RX-bu.patch index 81e7bf3d..b7a5e570 100644 --- a/dpdk/dpdk-16.04_patches/0009-enic-fix-imissed-rx-counter.patch +++ b/dpdk/dpdk-16.04_patches/0009-enic-fix-imissed-to-count-drops-due-to-lack-of-RX-bu.patch @@ -1,7 +1,7 @@ -From 3433c7828ec909fccb768636ee21867030da14c9 Mon Sep 17 00:00:00 2001 +From b41648c53981a534069a8ce1b75f189ba83e24c8 Mon Sep 17 00:00:00 2001 From: John Daley <johndale@cisco.com> Date: Tue, 26 Apr 2016 13:30:50 -0700 -Subject: [PATCH 1/3] enic: fix 'imissed' to count drops due to lack of RX +Subject: [PATCH 09/17] enic: fix 'imissed' to count drops due to lack of RX buffers Fixes: 7182d3e7d177 ("enic: expose Rx missed packets counter") @@ -11,7 +11,7 @@ Signed-off-by: John Daley <johndale@cisco.com> 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c -index 60fe765..be4e9e5 100644 +index e3da51d..06cacd4 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -243,10 +243,10 @@ void enic_dev_stats_get(struct enic *enic, struct rte_eth_stats *r_stats) @@ -25,8 +25,8 @@ index 60fe765..be4e9e5 100644 - r_stats->imissed = stats->rx.rx_drop; + r_stats->imissed = stats->rx.rx_no_bufs; + r_stats->imcasts = stats->rx.rx_multicast_frames_ok; r_stats->rx_nombuf = stats->rx.rx_no_bufs; - } -- -2.7.0 +2.7.4 diff --git a/dpdk/dpdk-16.04_patches/0011-enic-fix-misalignment-of-Rx-mbuf-data.patch b/dpdk/dpdk-16.04_patches/0011-enic-fix-misalignment-of-Rx-mbuf-data.patch index 69ca3f31..0d4267be 100644 --- a/dpdk/dpdk-16.04_patches/0011-enic-fix-misalignment-of-Rx-mbuf-data.patch +++ b/dpdk/dpdk-16.04_patches/0011-enic-fix-misalignment-of-Rx-mbuf-data.patch @@ -1,7 +1,7 @@ -From 454eb71eca1912e32a509c738a99a340cc2488cf Mon Sep 17 00:00:00 2001 +From d91c4e2de969086ebc8c3a1dfa30913ea3de37b4 Mon Sep 17 00:00:00 2001 From: John Daley <johndale@cisco.com> Date: Mon, 25 Apr 2016 16:24:53 -0700 -Subject: [PATCH 2/3] enic: fix misalignment of Rx mbuf data +Subject: [PATCH 11/17] enic: fix misalignment of Rx mbuf data Data DMA used m->data_off of uninitialized mbufs instead of RTE_PKTMBUF_HEADROOM, potentially causing Rx data to be @@ -15,10 +15,10 @@ Signed-off-by: John Daley <johndale@cisco.com> 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c -index be4e9e5..646d87f 100644 +index 06cacd4..b164307 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c -@@ -354,10 +354,11 @@ enic_alloc_rx_queue_mbufs(struct enic *enic, struct vnic_rq *rq) +@@ -355,10 +355,11 @@ enic_alloc_rx_queue_mbufs(struct enic *enic, struct vnic_rq *rq) return -ENOMEM; } @@ -51,5 +51,5 @@ index 232987a..39bb55c 100644 /* Fill in the rest of the mbuf */ rxmb->data_off = RTE_PKTMBUF_HEADROOM; -- -2.7.0 +2.7.4 diff --git a/dpdk/dpdk-16.04_patches/0012-enic-Optimization-of-Tx-path-to-reduce-Host-CPU-over.patch b/dpdk/dpdk-16.04_patches/0012-enic-Optimization-of-Tx-path-to-reduce-Host-CPU-over.patch index 4858b8f5..7acead45 100644 --- a/dpdk/dpdk-16.04_patches/0012-enic-Optimization-of-Tx-path-to-reduce-Host-CPU-over.patch +++ b/dpdk/dpdk-16.04_patches/0012-enic-Optimization-of-Tx-path-to-reduce-Host-CPU-over.patch @@ -1,7 +1,7 @@ -From ca6bbb723880e91d006de6cc485259da988859aa Mon Sep 17 00:00:00 2001 +From 4e1872a43b3ad824e37f840c9ed1e0c1f1b24a32 Mon Sep 17 00:00:00 2001 From: John Daley <johndale@cisco.com> Date: Tue, 5 Apr 2016 15:19:06 -0700 -Subject: [PATCH 3/3] enic: Optimization of Tx path to reduce Host CPU +Subject: [PATCH 12/17] enic: Optimization of Tx path to reduce Host CPU overhead, cleanup Optimizations and cleanup: @@ -642,7 +642,7 @@ index 6bea940..697ff82 100644 pdev = eth_dev->pci_dev; rte_eth_copy_pci_info(eth_dev, pdev); diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c -index 646d87f..ba73604 100644 +index b164307..9bfdec1 100644 --- a/drivers/net/enic/enic_main.c +++ b/drivers/net/enic/enic_main.c @@ -40,11 +40,11 @@ @@ -773,7 +773,7 @@ index 646d87f..ba73604 100644 void enic_dev_stats_clear(struct enic *enic) { -@@ -297,12 +217,28 @@ void enic_init_vnic_resources(struct enic *enic) +@@ -298,12 +218,28 @@ void enic_init_vnic_resources(struct enic *enic) unsigned int error_interrupt_enable = 1; unsigned int error_interrupt_offset = 0; unsigned int index = 0; @@ -802,7 +802,7 @@ index 646d87f..ba73604 100644 } for (index = 0; index < enic->wq_count; index++) { -@@ -310,22 +246,19 @@ void enic_init_vnic_resources(struct enic *enic) +@@ -311,22 +247,19 @@ void enic_init_vnic_resources(struct enic *enic) enic_cq_wq(enic, index), error_interrupt_enable, error_interrupt_offset); @@ -830,7 +830,7 @@ index 646d87f..ba73604 100644 } vnic_intr_init(&enic->intr, -@@ -569,6 +502,7 @@ void enic_free_wq(void *txq) +@@ -570,6 +503,7 @@ void enic_free_wq(void *txq) struct vnic_wq *wq = (struct vnic_wq *)txq; struct enic *enic = vnic_dev_priv(wq->vdev); @@ -838,7 +838,7 @@ index 646d87f..ba73604 100644 vnic_wq_free(wq); vnic_cq_free(&enic->cq[enic->rq_count + wq->index]); } -@@ -579,6 +513,8 @@ int enic_alloc_wq(struct enic *enic, uint16_t queue_idx, +@@ -580,6 +514,8 @@ int enic_alloc_wq(struct enic *enic, uint16_t queue_idx, int err; struct vnic_wq *wq = &enic->wq[queue_idx]; unsigned int cq_index = enic_cq_wq(enic, queue_idx); @@ -847,7 +847,7 @@ index 646d87f..ba73604 100644 wq->socket_id = socket_id; if (nb_desc) { -@@ -614,6 +550,18 @@ int enic_alloc_wq(struct enic *enic, uint16_t queue_idx, +@@ -615,6 +551,18 @@ int enic_alloc_wq(struct enic *enic, uint16_t queue_idx, dev_err(enic, "error in allocation of cq for wq\n"); } @@ -1840,5 +1840,5 @@ index 0000000..71ca34e + return index; +} -- -2.7.0 +2.7.4 diff --git a/dpdk/dpdk-16.04_patches/0013-Revert-ixgbe-fix-packet-type-from-vector-Rx.patch b/dpdk/dpdk-16.04_patches/0013-Revert-ixgbe-fix-packet-type-from-vector-Rx.patch index fca07a6f..e64ed590 100755 --- a/dpdk/dpdk-16.04_patches/0013-Revert-ixgbe-fix-packet-type-from-vector-Rx.patch +++ b/dpdk/dpdk-16.04_patches/0013-Revert-ixgbe-fix-packet-type-from-vector-Rx.patch @@ -1,7 +1,7 @@ -From 379d9246e60eb289edd911fbc27929cf73a038ac Mon Sep 17 00:00:00 2001 +From 33f94cb41621f2816db702b6b104f4642eefa857 Mon Sep 17 00:00:00 2001 From: Damjan Marion <damarion@cisco.com> Date: Fri, 29 Apr 2016 19:51:35 +0200 -Subject: [PATCH] Revert "ixgbe: fix packet type from vector Rx" +Subject: [PATCH 13/17] Revert "ixgbe: fix packet type from vector Rx" This reverts commit d9a2009a81089093645fea2e04b51dd37edf3e6f. --- @@ -10,10 +10,10 @@ This reverts commit d9a2009a81089093645fea2e04b51dd37edf3e6f. 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c -index eec607c..b24cdbd 100644 +index 3f1ebc1..c48cb52 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c -@@ -2996,7 +2996,9 @@ ixgbe_dev_supported_ptypes_get(struct rte_eth_dev *dev) +@@ -3000,7 +3000,9 @@ ixgbe_dev_supported_ptypes_get(struct rte_eth_dev *dev) if (dev->rx_pkt_burst == ixgbe_recv_pkts || dev->rx_pkt_burst == ixgbe_recv_pkts_lro_single_alloc || dev->rx_pkt_burst == ixgbe_recv_pkts_lro_bulk_alloc || diff --git a/dpdk/dpdk-16.04_patches/0015-enic-counter_improvement.patch b/dpdk/dpdk-16.04_patches/0015-ENIC-counter-improvement.patch index 6c8986bb..721fd107 100755..100644 --- a/dpdk/dpdk-16.04_patches/0015-enic-counter_improvement.patch +++ b/dpdk/dpdk-16.04_patches/0015-ENIC-counter-improvement.patch @@ -1,7 +1,19 @@ -diff -ur dpdk-16.04.orig/drivers/net/enic/enic.h dpdk-16.04/drivers/net/enic/enic.h ---- dpdk-16.04.orig/drivers/net/enic/enic.h 2016-05-26 16:59:16.531326660 -0700 -+++ dpdk-16.04/drivers/net/enic/enic.h 2016-05-26 16:59:52.689262489 -0700 -@@ -91,6 +91,11 @@ +From 30a3d6e23880094edfc51b49b11099c8b8bfa8cd Mon Sep 17 00:00:00 2001 +From: John Lo <loj@cisco.com> +Date: Tue, 7 Jun 2016 12:36:23 +0200 +Subject: [PATCH 15/17] ENIC counter improvement + +--- + drivers/net/enic/enic.h | 7 +++++++ + drivers/net/enic/enic_main.c | 38 ++++++++++++++++++++++++++++++++++---- + drivers/net/enic/enic_rxtx.c | 15 +++++++-------- + 3 files changed, 48 insertions(+), 12 deletions(-) + +diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h +index 43b82a6..7c1b5c9 100644 +--- a/drivers/net/enic/enic.h ++++ b/drivers/net/enic/enic.h +@@ -91,6 +91,11 @@ struct enic_fdir { struct enic_fdir_node *nodes[ENICPMD_FDIR_MAX]; }; @@ -13,7 +25,7 @@ diff -ur dpdk-16.04.orig/drivers/net/enic/enic.h dpdk-16.04/drivers/net/enic/eni /* Per-instance private data structure */ struct enic { struct enic *next; -@@ -133,6 +138,8 @@ +@@ -133,6 +138,8 @@ struct enic { /* interrupt resource */ struct vnic_intr intr; unsigned int intr_count; @@ -22,10 +34,11 @@ diff -ur dpdk-16.04.orig/drivers/net/enic/enic.h dpdk-16.04/drivers/net/enic/eni }; static inline unsigned int enic_cq_rq(__rte_unused struct enic *enic, unsigned int rq) -diff -ur dpdk-16.04.orig/drivers/net/enic/enic_main.c dpdk-16.04/drivers/net/enic/enic_main.c ---- dpdk-16.04.orig/drivers/net/enic/enic_main.c 2016-05-26 16:59:16.533326822 -0700 -+++ dpdk-16.04/drivers/net/enic/enic_main.c 2016-05-26 17:08:11.768801926 -0700 -@@ -142,22 +142,51 @@ +diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c +index 9bfdec1..a00565a 100644 +--- a/drivers/net/enic/enic_main.c ++++ b/drivers/net/enic/enic_main.c +@@ -142,22 +142,51 @@ static void enic_log_q_error(struct enic *enic) } @@ -78,7 +91,7 @@ diff -ur dpdk-16.04.orig/drivers/net/enic/enic_main.c dpdk-16.04/drivers/net/eni r_stats->opackets = stats->tx.tx_frames_ok; r_stats->ibytes = stats->rx.rx_bytes_ok; -@@ -166,10 +195,9 @@ +@@ -166,10 +195,9 @@ void enic_dev_stats_get(struct enic *enic, struct rte_eth_stats *r_stats) r_stats->ierrors = stats->rx.rx_errors + stats->rx.rx_drop; r_stats->oerrors = stats->tx.tx_errors; @@ -91,7 +104,7 @@ diff -ur dpdk-16.04.orig/drivers/net/enic/enic_main.c dpdk-16.04/drivers/net/eni } void enic_del_mac_address(struct enic *enic) -@@ -755,6 +783,8 @@ +@@ -755,6 +783,8 @@ int enic_setup_finish(struct enic *enic) { int ret; @@ -100,10 +113,11 @@ diff -ur dpdk-16.04.orig/drivers/net/enic/enic_main.c dpdk-16.04/drivers/net/eni ret = enic_set_rss_nic_cfg(enic); if (ret) { dev_err(enic, "Failed to config nic, aborting.\n"); -diff -ur dpdk-16.04.orig/drivers/net/enic/enic_rxtx.c dpdk-16.04/drivers/net/enic/enic_rxtx.c ---- dpdk-16.04.orig/drivers/net/enic/enic_rxtx.c 2016-05-26 16:59:16.522325929 -0700 -+++ dpdk-16.04/drivers/net/enic/enic_rxtx.c 2016-05-26 16:59:52.694262896 -0700 -@@ -251,6 +251,7 @@ +diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c +index 138dfb8..174486b 100644 +--- a/drivers/net/enic/enic_rxtx.c ++++ b/drivers/net/enic/enic_rxtx.c +@@ -251,6 +251,7 @@ enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, struct vnic_cq *cq; volatile struct cq_desc *cqd_ptr; uint8_t color; @@ -111,7 +125,7 @@ diff -ur dpdk-16.04.orig/drivers/net/enic/enic_rxtx.c dpdk-16.04/drivers/net/eni cq = &enic->cq[enic_cq_rq(enic, rq->index)]; rx_id = cq->to_clean; /* index of cqd, rqd, mbuf_table */ -@@ -278,10 +279,7 @@ +@@ -278,10 +279,7 @@ enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, /* allocate a new mbuf */ nmb = rte_rxmbuf_alloc(rq->mp); if (nmb == NULL) { @@ -123,7 +137,7 @@ diff -ur dpdk-16.04.orig/drivers/net/enic/enic_rxtx.c dpdk-16.04/drivers/net/eni break; } -@@ -323,9 +321,10 @@ +@@ -323,9 +321,10 @@ enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, rxmb->packet_type = enic_cq_rx_flags_to_pkt_type(&cqd); enic_cq_rx_to_pkt_flags(&cqd, rxmb); } else { @@ -137,7 +151,7 @@ diff -ur dpdk-16.04.orig/drivers/net/enic/enic_rxtx.c dpdk-16.04/drivers/net/eni } rxmb->data_len = rxmb->pkt_len; -@@ -337,7 +336,7 @@ +@@ -337,7 +336,7 @@ enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, rx_pkts[nb_rx++] = rxmb; } @@ -146,3 +160,6 @@ diff -ur dpdk-16.04.orig/drivers/net/enic/enic_rxtx.c dpdk-16.04/drivers/net/eni cq->to_clean = rx_id; if (nb_hold > rq->rx_free_thresh) { +-- +2.7.4 + diff --git a/dpdk/dpdk-16.04_patches/0016-enic-scatter-rx.patch b/dpdk/dpdk-16.04_patches/0016-ENIC-scatter-RX.patch index 0f1f3161..e0daab06 100755..100644 --- a/dpdk/dpdk-16.04_patches/0016-enic-scatter-rx.patch +++ b/dpdk/dpdk-16.04_patches/0016-ENIC-scatter-RX.patch @@ -1,7 +1,22 @@ -diff -r -u dpdk-16.04.orig2/drivers/net/enic/base/rq_enet_desc.h dpdk-16.04/drivers/net/enic/base/rq_enet_desc.h ---- dpdk-16.04.orig2/drivers/net/enic/base/rq_enet_desc.h 2016-05-13 18:09:07.523938072 -0700 -+++ dpdk-16.04/drivers/net/enic/base/rq_enet_desc.h 2016-05-13 18:09:54.359743075 -0700 -@@ -55,7 +55,7 @@ +From f03d5a02fc2b3cc24bf059a273ea1473cdb9993b Mon Sep 17 00:00:00 2001 +From: John Lo <loj@cisco.com> +Date: Tue, 7 Jun 2016 12:40:07 +0200 +Subject: [PATCH 16/17] ENIC scatter RX + +--- + drivers/net/enic/base/rq_enet_desc.h | 2 +- + drivers/net/enic/base/vnic_rq.c | 12 +- + drivers/net/enic/base/vnic_rq.h | 18 ++- + drivers/net/enic/enic.h | 10 ++ + drivers/net/enic/enic_main.c | 236 +++++++++++++++++++++++++++-------- + drivers/net/enic/enic_rxtx.c | 139 ++++++++++++++------- + 6 files changed, 313 insertions(+), 104 deletions(-) + +diff --git a/drivers/net/enic/base/rq_enet_desc.h b/drivers/net/enic/base/rq_enet_desc.h +index 7292d9d..13e24b4 100644 +--- a/drivers/net/enic/base/rq_enet_desc.h ++++ b/drivers/net/enic/base/rq_enet_desc.h +@@ -55,7 +55,7 @@ enum rq_enet_type_types { #define RQ_ENET_TYPE_BITS 2 #define RQ_ENET_TYPE_MASK ((1 << RQ_ENET_TYPE_BITS) - 1) @@ -10,10 +25,11 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/base/rq_enet_desc.h dpdk-16.04/driv u64 address, u8 type, u16 length) { desc->address = cpu_to_le64(address); -diff -r -u dpdk-16.04.orig2/drivers/net/enic/base/vnic_rq.c dpdk-16.04/drivers/net/enic/base/vnic_rq.c ---- dpdk-16.04.orig2/drivers/net/enic/base/vnic_rq.c 2016-05-13 18:09:07.533938883 -0700 -+++ dpdk-16.04/drivers/net/enic/base/vnic_rq.c 2016-05-13 18:09:54.360743158 -0700 -@@ -84,11 +84,16 @@ +diff --git a/drivers/net/enic/base/vnic_rq.c b/drivers/net/enic/base/vnic_rq.c +index cb62c5e..d97f93e 100644 +--- a/drivers/net/enic/base/vnic_rq.c ++++ b/drivers/net/enic/base/vnic_rq.c +@@ -84,11 +84,16 @@ void vnic_rq_init_start(struct vnic_rq *rq, unsigned int cq_index, iowrite32(cq_index, &rq->ctrl->cq_index); iowrite32(error_interrupt_enable, &rq->ctrl->error_interrupt_enable); iowrite32(error_interrupt_offset, &rq->ctrl->error_interrupt_offset); @@ -32,7 +48,7 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/base/vnic_rq.c dpdk-16.04/drivers/n } void vnic_rq_init(struct vnic_rq *rq, unsigned int cq_index, -@@ -96,6 +101,7 @@ +@@ -96,6 +101,7 @@ void vnic_rq_init(struct vnic_rq *rq, unsigned int cq_index, unsigned int error_interrupt_offset) { u32 fetch_index = 0; @@ -40,7 +56,7 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/base/vnic_rq.c dpdk-16.04/drivers/n /* Use current fetch_index as the ring starting point */ fetch_index = ioread32(&rq->ctrl->fetch_index); -@@ -110,6 +116,8 @@ +@@ -110,6 +116,8 @@ void vnic_rq_init(struct vnic_rq *rq, unsigned int cq_index, error_interrupt_offset); rq->rxst_idx = 0; rq->tot_pkts = 0; @@ -49,10 +65,11 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/base/vnic_rq.c dpdk-16.04/drivers/n } void vnic_rq_error_out(struct vnic_rq *rq, unsigned int error) -diff -r -u dpdk-16.04.orig2/drivers/net/enic/base/vnic_rq.h dpdk-16.04/drivers/net/enic/base/vnic_rq.h ---- dpdk-16.04.orig2/drivers/net/enic/base/vnic_rq.h 2016-05-13 18:09:07.540939452 -0700 -+++ dpdk-16.04/drivers/net/enic/base/vnic_rq.h 2016-05-13 18:09:54.362743322 -0700 -@@ -60,10 +60,18 @@ +diff --git a/drivers/net/enic/base/vnic_rq.h b/drivers/net/enic/base/vnic_rq.h +index 424415c..d1e2f52 100644 +--- a/drivers/net/enic/base/vnic_rq.h ++++ b/drivers/net/enic/base/vnic_rq.h +@@ -60,10 +60,18 @@ struct vnic_rq_ctrl { u32 pad7; u32 error_status; /* 0x48 */ u32 pad8; @@ -73,7 +90,7 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/base/vnic_rq.h dpdk-16.04/drivers/n }; struct vnic_rq { -@@ -82,6 +90,12 @@ +@@ -82,6 +90,12 @@ struct vnic_rq { struct rte_mempool *mp; uint16_t rxst_idx; uint32_t tot_pkts; @@ -86,10 +103,11 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/base/vnic_rq.h dpdk-16.04/drivers/n }; static inline unsigned int vnic_rq_desc_avail(struct vnic_rq *rq) -diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic.h dpdk-16.04/drivers/net/enic/enic.h ---- dpdk-16.04.orig2/drivers/net/enic/enic.h 2016-05-13 18:09:07.553940507 -0700 -+++ dpdk-16.04/drivers/net/enic/enic.h 2016-05-13 18:09:54.365743565 -0700 -@@ -142,6 +142,16 @@ +diff --git a/drivers/net/enic/enic.h b/drivers/net/enic/enic.h +index 7c1b5c9..d2de6ee 100644 +--- a/drivers/net/enic/enic.h ++++ b/drivers/net/enic/enic.h +@@ -142,6 +142,16 @@ struct enic { struct enic_soft_stats soft_stats; }; @@ -106,10 +124,11 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic.h dpdk-16.04/drivers/net/enic/ static inline unsigned int enic_cq_rq(__rte_unused struct enic *enic, unsigned int rq) { return rq; -diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic_main.c dpdk-16.04/drivers/net/enic/enic_main.c ---- dpdk-16.04.orig2/drivers/net/enic/enic_main.c 2016-05-13 18:09:07.557940834 -0700 -+++ dpdk-16.04/drivers/net/enic/enic_main.c 2016-05-13 18:10:40.099459001 -0700 -@@ -248,15 +248,23 @@ +diff --git a/drivers/net/enic/enic_main.c b/drivers/net/enic/enic_main.c +index a00565a..be17707 100644 +--- a/drivers/net/enic/enic_main.c ++++ b/drivers/net/enic/enic_main.c +@@ -247,15 +247,23 @@ void enic_init_vnic_resources(struct enic *enic) unsigned int error_interrupt_offset = 0; unsigned int index = 0; unsigned int cq_idx; @@ -134,7 +153,7 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic_main.c dpdk-16.04/drivers/net/ cq_idx = enic_cq_rq(enic, index); vnic_cq_init(&enic->cq[cq_idx], 0 /* flow_control_enable */, -@@ -306,6 +314,9 @@ +@@ -305,6 +313,9 @@ enic_alloc_rx_queue_mbufs(struct enic *enic, struct vnic_rq *rq) unsigned i; dma_addr_t dma_addr; @@ -144,7 +163,7 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic_main.c dpdk-16.04/drivers/net/ dev_debug(enic, "queue %u, allocating %u rx queue mbufs\n", rq->index, rq->ring.desc_count); -@@ -317,20 +328,20 @@ +@@ -316,20 +327,20 @@ enic_alloc_rx_queue_mbufs(struct enic *enic, struct vnic_rq *rq) return -ENOMEM; } @@ -173,7 +192,7 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic_main.c dpdk-16.04/drivers/net/ rq->rx_nb_hold = 0; dev_debug(enic, "port=%u, qidx=%u, Write %u posted idx, %u sw held\n", -@@ -338,6 +349,8 @@ +@@ -337,6 +348,8 @@ enic_alloc_rx_queue_mbufs(struct enic *enic, struct vnic_rq *rq) iowrite32(rq->posted_index, &rq->ctrl->posted_index); rte_rmb(); @@ -182,7 +201,7 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic_main.c dpdk-16.04/drivers/net/ return 0; } -@@ -399,17 +412,25 @@ +@@ -398,17 +411,25 @@ int enic_enable(struct enic *enic) "Flow director feature will not work\n"); for (index = 0; index < enic->rq_count; index++) { @@ -212,7 +231,7 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic_main.c dpdk-16.04/drivers/net/ vnic_dev_enable_wait(enic->vdev); -@@ -441,14 +462,26 @@ +@@ -440,14 +461,26 @@ int enic_alloc_intr_resources(struct enic *enic) void enic_free_rq(void *rxq) { @@ -221,7 +240,12 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic_main.c dpdk-16.04/drivers/net/ + struct vnic_rq *rq_sop = (struct vnic_rq *)rxq; + struct enic *enic = vnic_dev_priv(rq_sop->vdev); + struct vnic_rq *rq_data = &enic->rq[rq_sop->data_queue_idx]; -+ + +- enic_rxmbuf_queue_release(enic, rq); +- rte_free(rq->mbuf_ring); +- rq->mbuf_ring = NULL; +- vnic_rq_free(rq); +- vnic_cq_free(&enic->cq[rq->index]); + enic_rxmbuf_queue_release(enic, rq_sop); + if (rq_data->in_use) + enic_rxmbuf_queue_release(enic, rq_data); @@ -236,17 +260,12 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic_main.c dpdk-16.04/drivers/net/ + vnic_rq_free(rq_sop); + if (rq_data->in_use) + vnic_rq_free(rq_data); - -- enic_rxmbuf_queue_release(enic, rq); -- rte_free(rq->mbuf_ring); -- rq->mbuf_ring = NULL; -- vnic_rq_free(rq); -- vnic_cq_free(&enic->cq[rq->index]); ++ + vnic_cq_free(&enic->cq[rq_sop->index]); } void enic_start_wq(struct enic *enic, uint16_t queue_idx) -@@ -463,12 +496,32 @@ +@@ -462,12 +495,32 @@ int enic_stop_wq(struct enic *enic, uint16_t queue_idx) void enic_start_rq(struct enic *enic, uint16_t queue_idx) { @@ -281,7 +300,7 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic_main.c dpdk-16.04/drivers/net/ } int enic_alloc_rq(struct enic *enic, uint16_t queue_idx, -@@ -476,53 +529,128 @@ +@@ -475,53 +528,128 @@ int enic_alloc_rq(struct enic *enic, uint16_t queue_idx, uint16_t nb_desc) { int rc; @@ -364,13 +383,13 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic_main.c dpdk-16.04/drivers/net/ } + dev_info(enic, "For mtu %d and mbuf size %d valid rx descriptor range is %d to %d\n", + enic->config.mtu, mbuf_size, min_sop + min_data, max_sop + max_data); -+ -+ dev_info(enic, "Using %d rx descriptors (sop %d, data %d)\n", -+ nb_sop_desc + nb_data_desc, nb_sop_desc, nb_data_desc); - /* Allocate queue resources */ - rc = vnic_rq_alloc(enic->vdev, rq, queue_idx, - nb_desc, sizeof(struct rq_enet_desc)); ++ dev_info(enic, "Using %d rx descriptors (sop %d, data %d)\n", ++ nb_sop_desc + nb_data_desc, nb_sop_desc, nb_data_desc); ++ + /* Allocate sop queue resources */ + rc = vnic_rq_alloc(enic->vdev, rq_sop, sop_queue_idx, + nb_sop_desc, sizeof(struct rq_enet_desc)); @@ -379,8 +398,9 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic_main.c dpdk-16.04/drivers/net/ + dev_err(enic, "error in allocation of sop rq\n"); goto err_exit; } +- + nb_sop_desc = rq_sop->ring.desc_count; - ++ + if (rq_data->in_use) { + /* Allocate data queue resources */ + rc = vnic_rq_alloc(enic->vdev, rq_data, data_queue_idx, @@ -441,11 +461,11 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic_main.c dpdk-16.04/drivers/net/ err_exit: return -ENOMEM; } - -diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic_rxtx.c dpdk-16.04/drivers/net/enic/enic_rxtx.c ---- dpdk-16.04.orig2/drivers/net/enic/enic_rxtx.c 2016-05-13 18:09:07.556940752 -0700 -+++ dpdk-16.04/drivers/net/enic/enic_rxtx.c 2016-05-13 18:12:22.225755674 -0700 -@@ -242,22 +242,27 @@ +diff --git a/drivers/net/enic/enic_rxtx.c b/drivers/net/enic/enic_rxtx.c +index 174486b..463b954 100644 +--- a/drivers/net/enic/enic_rxtx.c ++++ b/drivers/net/enic/enic_rxtx.c +@@ -242,22 +242,27 @@ uint16_t enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts) { @@ -469,21 +489,20 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic_rxtx.c dpdk-16.04/drivers/net/ + uint16_t seg_length; + struct rte_mbuf *first_seg = sop_rq->pkt_first_seg; + struct rte_mbuf *last_seg = sop_rq->pkt_last_seg; -+ -+ cq = &enic->cq[enic_cq_rq(enic, sop_rq->index)]; -+ cq_idx = cq->to_clean; /* index of cqd, rqd, mbuf_table */ -+ cqd_ptr = (struct cq_desc *)(cq->ring.descs) + cq_idx; - cq = &enic->cq[enic_cq_rq(enic, rq->index)]; - rx_id = cq->to_clean; /* index of cqd, rqd, mbuf_table */ - cqd_ptr = (struct cq_desc *)(cq->ring.descs) + rx_id; -- ++ cq = &enic->cq[enic_cq_rq(enic, sop_rq->index)]; ++ cq_idx = cq->to_clean; /* index of cqd, rqd, mbuf_table */ ++ cqd_ptr = (struct cq_desc *)(cq->ring.descs) + cq_idx; + - nb_hold = rq->rx_nb_hold; /* mbufs held by software */ + data_rq = &enic->rq[sop_rq->data_queue_idx]; while (nb_rx < nb_pkts) { volatile struct rq_enet_desc *rqd_ptr; -@@ -265,6 +270,7 @@ +@@ -265,6 +270,7 @@ enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, struct cq_desc cqd; uint64_t ol_err_flags; uint8_t packet_error; @@ -491,7 +510,7 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic_rxtx.c dpdk-16.04/drivers/net/ /* Check for pkts available */ color = (cqd_ptr->type_color >> CQ_DESC_COLOR_SHIFT) -@@ -272,9 +278,13 @@ +@@ -272,9 +278,13 @@ enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, if (color == cq->last_color) break; @@ -507,7 +526,7 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic_rxtx.c dpdk-16.04/drivers/net/ /* allocate a new mbuf */ nmb = rte_rxmbuf_alloc(rq->mp); -@@ -287,67 +297,106 @@ +@@ -287,67 +297,106 @@ enic_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, packet_error = enic_cq_rx_to_pkt_err_flags(&cqd, &ol_err_flags); /* Get the mbuf to return and replace with one just allocated */ @@ -648,3 +667,6 @@ diff -r -u dpdk-16.04.orig2/drivers/net/enic/enic_rxtx.c dpdk-16.04/drivers/net/ return nb_rx; } +-- +2.7.4 + diff --git a/dpdk/dpdk-16.04_patches/0017-i40e-Set-PKT_RX_VLAN_PKT-flag-for-VLAN-packets.patch b/dpdk/dpdk-16.04_patches/0017-i40e-Set-PKT_RX_VLAN_PKT-flag-for-VLAN-packets.patch index f8f69b0f..a40b537f 100755..100644 --- a/dpdk/dpdk-16.04_patches/0017-i40e-Set-PKT_RX_VLAN_PKT-flag-for-VLAN-packets.patch +++ b/dpdk/dpdk-16.04_patches/0017-i40e-Set-PKT_RX_VLAN_PKT-flag-for-VLAN-packets.patch @@ -1,17 +1,17 @@ -From af8bfd030fdaa0acb3222296ab7a24bc4ac196f5 Mon Sep 17 00:00:00 2001 +From 2c75df63533e1eaa97c24f41bbd6a5b131ff52ce Mon Sep 17 00:00:00 2001 From: Georgi Savov <gsavov@cisco.com> Date: Tue, 10 May 2016 10:59:55 -0400 -Subject: [PATCH 30/31] i40e Set PKT_RX_VLAN_PKT flag for VLAN packets +Subject: [PATCH 17/17] i40e Set PKT_RX_VLAN_PKT flag for VLAN packets --- drivers/net/i40e/i40e_rxtx.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_rxtx.c b/drivers/net/i40e/i40e_rxtx.c -index 39d94ec..07341df 100644 +index 4d35d83..a2bb9a9 100644 --- a/drivers/net/i40e/i40e_rxtx.c +++ b/drivers/net/i40e/i40e_rxtx.c -@@ -99,7 +99,23 @@ i40e_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union i40e_rx_desc *rxdp) +@@ -94,7 +94,23 @@ i40e_rxd_to_vlan_tci(struct rte_mbuf *mb, volatile union i40e_rx_desc *rxdp) PMD_RX_LOG(DEBUG, "Descriptor l2tag1: %u", rte_le_to_cpu_16(rxdp->wb.qword0.lo_dword.l2tag1)); } else { @@ -37,5 +37,5 @@ index 39d94ec..07341df 100644 #ifndef RTE_LIBRTE_I40E_16BYTE_RX_DESC if (rte_le_to_cpu_16(rxdp->wb.qword2.ext_status) & -- -1.9.1 +2.7.4 |