From: "Xu, Qian Q" <qian.q.xu@intel.com>
To: "Tao, Zhe" <zhe.tao@intel.com>, "dev@dpdk.org" <dev@dpdk.org>
Cc: "Tao, Zhe" <zhe.tao@intel.com>, "Wu, Jingjing" <jingjing.wu@intel.com>
Subject: Re: [dpdk-dev] [PATCH 1/3 v7] i40e: support floating VEB config
Date: Mon, 28 Mar 2016 02:23:44 +0000 [thread overview]
Message-ID: <82F45D86ADE5454A95A89742C8D1410E0321438F@shsmsx102.ccr.corp.intel.com> (raw)
In-Reply-To: <1458895321-21896-2-git-send-email-zhe.tao@intel.com>
Tested-by: Qian Xu <qian.q.xu@intel.com>
- Test Commit: 8f6f24342281f59de0df7bd976a32f714d39b9a9
- OS/Kernel: Fedora 21/4.1.13
- GCC: gcc (GCC) 4.9.2 20141101 (Red Hat 4.9.2-1)
- CPU: Intel(R) Xeon(R) CPU E5-2695 v4 @ 2.10
- NIC: Intel(R) Ethernet Controller X710 for 10GbE SFP+
- Total 2 cases, 2 passed, 0 failed.
Test Case5: Floating VEB Inter-VM VF-VF
=======================================
Summary: DPDK PF, then create 2VFs and 2VMs, assign one VF to one VM, say VF1 in VM1, VF2 in VM2, and make PF link down(the cable can be pluged out). VFs in VMs are running dpdk testpmd, send traffic to VF1, and set the packet's DEST MAC to VF2, check if VF2 can receive the packets. Check Inter-VM VF-VF MAC switch when PF is link down as well as up.
Details:
1. Start VM1 with VF1, VM2 with VF2, see the prerequisite part.
2. In the host, run testpmd with floating parameters and make the link down::
./testpmd -c 0x3 -n 4 -w 8c:00.0,enable_floating=1 -- -i
testpmd> port stop all
testpmd> show port info all
3. In VM1, run testpmd::
./testpmd -c 0x3 -n 4 -- -i
testpmd>set mac fwd
testpmd>set promisc off all
testpmd>start
In VM2, run testpmd::
./testpmd -c 0x3 -n 4 -- -i --eth-peer=0, VF1's MAC
testpmd>set mac fwd
testpmd>set promisc off all
testpmd>start
4. Send 100 packets to VF1's MAC address, check if VF2 can get 100 packets. Also check the PF's port stats, and there should be no packets RX/TX at PF port.
5. In the host, run testpmd with floating parameters and keep the link up, then do step3 and step4, PF should have no RX/TX packets even when link is up::
./testpmc -c 0xc0000 -n 4 --floating -- -i
testpmd> port start all
testpmd> show port info all
Test Case6: Floating VEB Inter-VM VF traffic can't be out of NIC
================================================================
DPDK PF, then create 1VF, assign VF1 to VM1, send traffic from VF1 to outside world, then check outside world will not see any traffic.
Details:
1. Start VM1 with VF1, see the prerequisite part.
2. In the host, run testpmd with floating parameters.
./testpmd -c 0x3 -n 4 -w 8c:00.0,enable_floating=1 -- -i
3. In VM1, run testpmd, ::
./testpmd -c 0x3 -n 4 -- -i --eth-peer=0,pf_mac_addr
testpmd>set fwd txonly
testpmd>start
4. At PF side, check the port stats to see if there is any RX/TX packets, and also check the traffic generator side(e.g: IXIA ports or another port connected to the DUT port) to ensure no packets.
Thanks
Qian
-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhe Tao
Sent: Friday, March 25, 2016 4:42 PM
To: dev@dpdk.org
Cc: Tao, Zhe; Wu, Jingjing
Subject: [dpdk-dev] [PATCH 1/3 v7] i40e: support floating VEB config
Add the new floating related argument option in the devarg.
Using this parameter, all the samples can decide whether to use legacy VEB/VEPA or floating VEB.
To enable this feature, the user should pass a devargs parameter to the EAL like "-w 84:00.0,enable_floating=1", and the application will make sure the PMD will use the floating VEB feature for all the VFs created by this PF device.
Signed-off-by: Zhe Tao <zhe.tao@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 44 ++++++++++++++++++++++++++++++++++++++++++
drivers/net/i40e/i40e_ethdev.h | 6 ++++++
2 files changed, 50 insertions(+)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 6fdae57..01f1d3d 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -739,6 +739,44 @@ i40e_add_tx_flow_control_drop_filter(struct i40e_pf *pf)
" frames from VSIs.");
}
+static int i40e_check_floating_handler(__rte_unused const char *key,
+ const char *value,
+ __rte_unused void *opaque)
+{
+ if (strcmp(value, "1"))
+ return -1;
+
+ return 0;
+}
+
+static int
+i40e_check_floating(struct rte_devargs *devargs) {
+ struct rte_kvargs *kvlist;
+ const char *floating_key = "enable_floating";
+
+ if (devargs == NULL)
+ return 0;
+
+ kvlist = rte_kvargs_parse(devargs->args, NULL);
+ if (kvlist == NULL)
+ return 0;
+
+ if (!rte_kvargs_count(kvlist, floating_key)) {
+ rte_kvargs_free(kvlist);
+ return 0;
+ }
+ /* Floating is enabled when there's key-value pair: enable_floating=1 */
+ if (rte_kvargs_process(kvlist, floating_key,
+ i40e_check_floating_handler, NULL) < 0) {
+ rte_kvargs_free(kvlist);
+ return 0;
+ }
+ rte_kvargs_free(kvlist);
+
+ return 1;
+}
+
static int
eth_i40e_dev_init(struct rte_eth_dev *dev) { @@ -829,6 +867,12 @@ eth_i40e_dev_init(struct rte_eth_dev *dev)
((hw->nvm.version >> 4) & 0xff),
(hw->nvm.version & 0xf), hw->nvm.eetrack);
+ /* Need the special FW version support floating VEB */
+ if (hw->aq.fw_maj_ver >= FLOATING_FW_MAJ) {
+ pf->floating = i40e_check_floating(pci_dev->devargs);
+ } else {
+ pf->floating = false;
+ }
/* Clear PXE mode */
i40e_clear_pxe_mode(hw);
diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h index 1c75672..7dc6936 100644
--- a/drivers/net/i40e/i40e_ethdev.h
+++ b/drivers/net/i40e/i40e_ethdev.h
@@ -36,6 +36,7 @@
#include <rte_eth_ctrl.h>
#include <rte_time.h>
+#include <rte_kvargs.h>
#define I40E_VLAN_TAG_SIZE 4
@@ -171,6 +172,10 @@ enum i40e_flxpld_layer_idx { #define I40E_QUEUE_ITR_INTERVAL_DEFAULT 32 /* 32 us */
#define I40E_QUEUE_ITR_INTERVAL_MAX 8160 /* 8160 us */
+/* Special FW support this floating VEB feature */ #define
+FLOATING_FW_MAJ 5 #define FLOATING_FW_MIN 0
+
struct i40e_adapter;
/**
@@ -446,6 +451,7 @@ struct i40e_pf {
struct i40e_fc_conf fc_conf; /* Flow control conf */
struct i40e_mirror_rule_list mirror_list;
uint16_t nb_mirror_rule; /* The number of mirror rules */
+ uint16_t floating; /* The flag to use the floating VEB */
};
enum pending_msg {
--
2.1.4
next prev parent reply other threads:[~2016-03-28 2:23 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-21 7:24 [dpdk-dev] [PATCH 0/2] Add floating VEB support for i40e Zhe Tao
2016-01-21 7:24 ` [dpdk-dev] PATCH 1/2] i40e: support floating VEB config Zhe Tao
2016-01-21 7:29 ` David Marchand
2016-01-21 7:53 ` Vincent JARDIN
2016-02-03 8:53 ` Xu, Qian Q
2016-02-23 9:13 ` [dpdk-dev] [PATCH 0/2 v2] i40e: Add floating VEB support for i40e Zhe Tao
2016-02-23 9:13 ` [dpdk-dev] [PATCH 1/2 v2] i40e: support floating VEB config Zhe Tao
2016-02-25 0:55 ` Wu, Jingjing
2016-02-23 9:13 ` [dpdk-dev] [PATCH 2/2 v2] i40e: Add floating VEB support in i40e Zhe Tao
2016-02-25 1:15 ` Wu, Jingjing
2016-02-25 6:31 ` [dpdk-dev] [PATCH 0/2 v3] i40e: Add floating VEB support for i40e Zhe Tao
2016-02-25 6:31 ` [dpdk-dev] [PATCH 1/2 v3] i40e: support floating VEB config Zhe Tao
2016-02-25 6:31 ` [dpdk-dev] [PATCH 2/2 v3] i40e: Add floating VEB support in i40e Zhe Tao
2016-03-02 2:31 ` Xu, Qian Q
2016-03-02 8:08 ` [dpdk-dev] [PATCH 0/2 v4] i40e: Add floating VEB support for i40e Zhe Tao
2016-03-02 8:08 ` [dpdk-dev] [PATCH 1/2 v4] i40e: support floating VEB config Zhe Tao
2016-03-02 8:08 ` [dpdk-dev] [PATCH 2/2 v4] i40e: Add floating VEB support in i40e Zhe Tao
2016-03-23 12:27 ` [dpdk-dev] [PATCH 0/2 v5] i40e: Add floating VEB support for i40e Zhe Tao
2016-03-23 12:27 ` [dpdk-dev] [PATCH 1/2 v5] i40e: support floating VEB config Zhe Tao
2016-03-23 12:51 ` Thomas Monjalon
2016-03-24 2:31 ` Zhe Tao
2016-03-23 12:27 ` [dpdk-dev] [PATCH 2/2 v5] i40e: Add floating VEB support in i40e Zhe Tao
2016-03-24 10:48 ` [dpdk-dev] [PATCH 0/2 v6] i40e: Add floating VEB support for i40e Zhe Tao
2016-03-24 10:48 ` [dpdk-dev] [PATCH 1/2 v6] i40e: support floating VEB config Zhe Tao
2016-03-24 10:48 ` [dpdk-dev] [PATCH 2/2 v6] i40e: Add floating VEB support in i40e Zhe Tao
2016-03-25 8:41 ` [dpdk-dev] [PATCH 0/3 v7] i40e: Add floating VEB support for i40e Zhe Tao
2016-03-25 8:41 ` [dpdk-dev] [PATCH 1/3 v7] i40e: support floating VEB config Zhe Tao
2016-03-28 2:23 ` Xu, Qian Q [this message]
2016-03-25 8:41 ` [dpdk-dev] [PATCH 2/3 v7] i40e: Add floating VEB support in i40e Zhe Tao
2016-04-20 7:31 ` Wu, Jingjing
2016-03-25 8:42 ` [dpdk-dev] [PATCH 3/3 v7] i40e: Add global reset support for i40e Zhe Tao
2016-04-20 10:15 ` Wu, Jingjing
2016-03-25 15:28 ` [dpdk-dev] [PATCH 0/3 v7] i40e: Add floating VEB " Bruce Richardson
2016-04-20 14:22 ` Bruce Richardson
2016-05-24 17:28 ` [dpdk-dev] [PATCH v8 0/3] " Zhe Tao
2016-05-24 17:28 ` [dpdk-dev] [PATCH v8 1/3] i40e: support floating VEB config Zhe Tao
2016-06-09 15:50 ` Bruce Richardson
2016-05-24 17:28 ` [dpdk-dev] [PATCH v8 2/3] i40e: Add floating VEB support in i40e Zhe Tao
2016-06-09 15:55 ` Bruce Richardson
2016-05-24 17:28 ` [dpdk-dev] [PATCH v8 3/3] i40e: add floating VEB extension support Zhe Tao
2016-05-30 15:49 ` Peng, Yuan
2016-06-09 15:57 ` Bruce Richardson
2016-05-24 19:22 ` [dpdk-dev] [PATCH v8 0/3] i40e: Add floating VEB support for i40e Stephen Hemminger
2016-05-25 10:05 ` Thomas Monjalon
2016-05-31 2:25 ` Wu, Jingjing
2016-06-13 6:45 ` [dpdk-dev] [PATCH v9 0/3] i40e: add " Zhe Tao
2016-06-13 6:45 ` [dpdk-dev] [PATCH v9 1/3] i40e: support floating VEB config Zhe Tao
2016-06-13 6:45 ` [dpdk-dev] [PATCH v9 2/3] i40e: add floating VEB support in i40e Zhe Tao
2016-06-13 6:45 ` [dpdk-dev] [PATCH v9 3/3] i40e: add floating VEB extension support Zhe Tao
2016-06-13 8:02 ` [dpdk-dev] [PATCH v10 0/3] i40e: add floating VEB support for i40e Zhe Tao
2016-06-13 8:02 ` [dpdk-dev] [PATCH v10 1/3] i40e: support floating VEB config Zhe Tao
2016-06-13 8:02 ` [dpdk-dev] [PATCH v10 2/3] i40e: add floating VEB support in i40e Zhe Tao
2016-06-13 8:02 ` [dpdk-dev] [PATCH v10 3/3] i40e: add floating VEB extension support Zhe Tao
2016-06-14 3:38 ` [dpdk-dev] [PATCH v10 0/3] i40e: add floating VEB support for i40e Wu, Jingjing
2016-06-14 5:57 ` [dpdk-dev] [PATCH v11 " Zhe Tao
2016-06-13 21:44 ` Zhe Tao
2016-06-14 5:57 ` [dpdk-dev] [PATCH v11 1/3] i40e: support floating VEB config Zhe Tao
2016-06-14 5:57 ` [dpdk-dev] [PATCH v11 2/3] i40e: add floating VEB support in i40e Zhe Tao
2016-06-14 5:57 ` [dpdk-dev] [PATCH v11 3/3] i40e: add floating VEB extension support Zhe Tao
2016-06-24 8:29 ` [dpdk-dev] [PATCH v12 0/2] i40e: add floating VEB support for i40e Zhe Tao
2016-06-24 8:29 ` [dpdk-dev] [PATCH v12 1/2] i40e: support floating VEB config Zhe Tao
2016-06-24 9:27 ` Bruce Richardson
2016-06-24 11:14 ` Ferruh Yigit
2016-06-26 20:28 ` Zhe Tao
2016-06-24 8:29 ` [dpdk-dev] [PATCH v12 2/2] i40e: add floating VEB support in i40e Zhe Tao
2016-06-27 5:12 ` [dpdk-dev] [PATCH v13 0/2] i40e: add floating VEB support for i40e Zhe Tao
2016-06-27 5:12 ` [dpdk-dev] [PATCH v13 1/2] i40e: support floating VEB config Zhe Tao
2016-06-27 5:12 ` [dpdk-dev] [PATCH v13 2/2] i40e: add floating VEB support in i40e Zhe Tao
2016-06-27 7:20 ` [dpdk-dev] [PATCH v14 0/2] i40e: add floating VEB support for i40e Zhe Tao
2016-06-27 7:20 ` [dpdk-dev] [PATCH v14 1/2] i40e: support floating VEB config Zhe Tao
2016-06-27 7:20 ` [dpdk-dev] [PATCH v14 2/2] i40e: add floating VEB support in i40e Zhe Tao
2016-06-27 13:22 ` [dpdk-dev] [PATCH v14 0/2] i40e: add floating VEB support for i40e Ferruh Yigit
2016-06-29 9:42 ` Bruce Richardson
2016-06-29 13:06 ` [dpdk-dev] [PATCH v15 " Zhe Tao
2016-06-29 13:06 ` [dpdk-dev] [PATCH v15 1/2] i40e: add floating VEB support Zhe Tao
2016-06-29 13:06 ` [dpdk-dev] [PATCH v15 2/2] i40e: add device args to enable a floating VEB Zhe Tao
2016-06-29 13:47 ` Mcnamara, John
2016-06-29 14:22 ` Bruce Richardson
2016-01-21 7:24 ` [dpdk-dev] [PATCH 2/2] i40e: Add floating VEB support in i40e Zhe Tao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=82F45D86ADE5454A95A89742C8D1410E0321438F@shsmsx102.ccr.corp.intel.com \
--to=qian.q.xu@intel.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=zhe.tao@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).