* [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1
@ 2016-06-16 5:47 Rasesh Mody
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 1/9] qede: add support for setting hash configuration Rasesh Mody
` (9 more replies)
0 siblings, 10 replies; 15+ messages in thread
From: Rasesh Mody @ 2016-06-16 5:47 UTC (permalink / raw)
To: bruce.richardson; +Cc: dev, Dept-EngDPDKDev, Rasesh Mody
Hi Bruce,
v2 series:
- made subject and description of the patches verbose where needed.
- extended stats patch: some of the stats may sound similar, however,
they are different stats collected by different hw componenets
(eg. mac, rx pipeline, etc). We've tried our best to elaborate each
stat as applicable and provided a direction. All other comments on
the patch addressed.
This patch set adds support for enabling 100G mode for QEDE PMD.
It also adds support for APIs like
- mtu_set
- reta_update
- reta_query
- rss_hash_update
- rss_hash_conf_get
- xstats_get
The changes include enablement of vf-vf traffic and updated the driver
version to 8.7.9.0_1.1.0.1
The patches have been generated and tested against dpdk-next-net rel_16_07
branch.
Please apply!
Harish Patil (2):
qede: add 100g mode support
qede: update version to 8.7.9.0_1.1.0.1
Rasesh Mody (1):
qede: add support for xstats
Sony Chacko (6):
qede: add support for setting hash configuration
qede: add support for getting rss hash configuration
qede: add support for setting rss redirection table
qede: add support for querying rss redirection table
qede: add support for setting the MTU
qede: update vport filter settings
config/common_base | 2 +-
doc/guides/nics/overview.rst | 6 +-
doc/guides/nics/qede.rst | 11 +-
drivers/net/qede/base/ecore_l2.c | 19 +-
drivers/net/qede/qede_eth_if.c | 45 ++--
drivers/net/qede/qede_eth_if.h | 1 +
drivers/net/qede/qede_ethdev.c | 422 +++++++++++++++++++++++++++++++++++++-
drivers/net/qede/qede_ethdev.h | 10 +-
drivers/net/qede/qede_rxtx.c | 42 ++--
9 files changed, 498 insertions(+), 60 deletions(-)
--
1.7.10.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH v2 1/9] qede: add support for setting hash configuration
2016-06-16 5:47 [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1 Rasesh Mody
@ 2016-06-16 5:47 ` Rasesh Mody
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 2/9] qede: add support for getting rss " Rasesh Mody
` (8 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Rasesh Mody @ 2016-06-16 5:47 UTC (permalink / raw)
To: bruce.richardson; +Cc: dev, Dept-EngDPDKDev, Sony Chacko
From: Sony Chacko <sony.chacko@qlogic.com>
Add support for setting hash configuration based on adapter capability
and update corresponding NIC documentation.
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
---
doc/guides/nics/overview.rst | 2 +-
doc/guides/nics/qede.rst | 3 +--
drivers/net/qede/qede_eth_if.h | 1 +
drivers/net/qede/qede_ethdev.c | 43 ++++++++++++++++++++++++++++++++++++++++
drivers/net/qede/qede_rxtx.c | 42 +++++++++++++++++++++++++++------------
5 files changed, 75 insertions(+), 16 deletions(-)
diff --git a/doc/guides/nics/overview.rst b/doc/guides/nics/overview.rst
index 2200171..2327f5e 100644
--- a/doc/guides/nics/overview.rst
+++ b/doc/guides/nics/overview.rst
@@ -102,7 +102,7 @@ Most of these differences are summarized below.
Unicast MAC filter Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
Multicast MAC filter Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
RSS hash Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
- RSS key update Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
+ RSS key update Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
RSS reta update Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
VMDq Y Y Y Y Y Y Y
SR-IOV Y Y Y Y Y Y Y Y Y Y
diff --git a/doc/guides/nics/qede.rst b/doc/guides/nics/qede.rst
index 9ff3d1d..c5fbd83 100644
--- a/doc/guides/nics/qede.rst
+++ b/doc/guides/nics/qede.rst
@@ -51,7 +51,7 @@ Supported Features
- VLAN offload - Filtering and stripping
- Stateless checksum offloads (IPv4/TCP/UDP)
- Multiple Rx/Tx queues (queue-pairs)
-- RSS (with default table/key)
+- RSS (with user configurable table/key)
- TSS
- Multiple MAC address
- Default pause flow control
@@ -61,7 +61,6 @@ Non-supported Features
----------------------
- Scatter-Gather Rx/Tx frames
-- User configurable RETA table/key
- Unequal number of Rx/Tx queues
- MTU change (dynamic)
- SR-IOV PF
diff --git a/drivers/net/qede/qede_eth_if.h b/drivers/net/qede/qede_eth_if.h
index 61f677c..26968eb 100644
--- a/drivers/net/qede/qede_eth_if.h
+++ b/drivers/net/qede/qede_eth_if.h
@@ -53,6 +53,7 @@ struct qed_dev_eth_info {
struct qed_update_vport_rss_params {
uint16_t rss_ind_table[128];
uint32_t rss_key[10];
+ u8 rss_caps;
};
struct qed_stop_rxq_params {
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 1273fd3..84ff6f8 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -753,6 +753,47 @@ qede_dev_supported_ptypes_get(struct rte_eth_dev *eth_dev)
return NULL;
}
+int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
+ struct rte_eth_rss_conf *rss_conf)
+{
+ struct qed_update_vport_params vport_update_params;
+ struct qede_dev *qdev = eth_dev->data->dev_private;
+ struct ecore_dev *edev = &qdev->edev;
+ uint8_t rss_caps;
+ uint32_t *key = (uint32_t *)rss_conf->rss_key;
+ uint64_t hf = rss_conf->rss_hf;
+ int i;
+
+ if (hf == 0)
+ DP_ERR(edev, "hash function 0 will disable RSS\n");
+
+ rss_caps = 0;
+ rss_caps |= (hf & ETH_RSS_IPV4) ? ECORE_RSS_IPV4 : 0;
+ rss_caps |= (hf & ETH_RSS_IPV6) ? ECORE_RSS_IPV6 : 0;
+ rss_caps |= (hf & ETH_RSS_IPV6_EX) ? ECORE_RSS_IPV6 : 0;
+ rss_caps |= (hf & ETH_RSS_NONFRAG_IPV4_TCP) ? ECORE_RSS_IPV4_TCP : 0;
+ rss_caps |= (hf & ETH_RSS_NONFRAG_IPV6_TCP) ? ECORE_RSS_IPV6_TCP : 0;
+ rss_caps |= (hf & ETH_RSS_IPV6_TCP_EX) ? ECORE_RSS_IPV6_TCP : 0;
+
+ /* If the mapping doesn't fit any supported, return */
+ if (rss_caps == 0 && hf != 0)
+ return -EINVAL;
+
+ memset(&vport_update_params, 0, sizeof(vport_update_params));
+
+ if (key != NULL)
+ memcpy(qdev->rss_params.rss_key, rss_conf->rss_key,
+ rss_conf->rss_key_len);
+
+ qdev->rss_params.rss_caps = rss_caps;
+ memcpy(&vport_update_params.rss_params, &qdev->rss_params,
+ sizeof(vport_update_params.rss_params));
+ vport_update_params.update_rss_flg = 1;
+ vport_update_params.vport_id = 0;
+
+ return qdev->ops->vport_update(edev, &vport_update_params);
+}
+
static const struct eth_dev_ops qede_eth_dev_ops = {
.dev_configure = qede_dev_configure,
.dev_infos_get = qede_dev_info_get,
@@ -780,6 +821,7 @@ static const struct eth_dev_ops qede_eth_dev_ops = {
.flow_ctrl_set = qede_flow_ctrl_set,
.flow_ctrl_get = qede_flow_ctrl_get,
.dev_supported_ptypes_get = qede_dev_supported_ptypes_get,
+ .rss_hash_update = qede_rss_hash_update,
};
static const struct eth_dev_ops qede_eth_vf_dev_ops = {
@@ -804,6 +846,7 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = {
.vlan_offload_set = qede_vlan_offload_set,
.vlan_filter_set = qede_vlan_filter_set,
.dev_supported_ptypes_get = qede_dev_supported_ptypes_get,
+ .rss_hash_update = qede_rss_hash_update,
};
static void qede_update_pf_params(struct ecore_dev *edev)
diff --git a/drivers/net/qede/qede_rxtx.c b/drivers/net/qede/qede_rxtx.c
index 94f3c78..ccce5fd 100644
--- a/drivers/net/qede/qede_rxtx.c
+++ b/drivers/net/qede/qede_rxtx.c
@@ -532,13 +532,18 @@ static int
qede_config_rss(struct rte_eth_dev *eth_dev,
struct qed_update_vport_rss_params *rss_params)
{
+ struct rte_eth_rss_conf rss_conf;
enum rte_eth_rx_mq_mode mode = eth_dev->data->dev_conf.rxmode.mq_mode;
- struct rte_eth_rss_conf rss_conf =
- eth_dev->data->dev_conf.rx_adv_conf.rss_conf;
struct qede_dev *qdev = eth_dev->data->dev_private;
struct ecore_dev *edev = &qdev->edev;
+ uint8_t rss_caps;
unsigned int i;
+ uint64_t hf;
+ uint32_t *key;
+ rss_conf = eth_dev->data->dev_conf.rx_adv_conf.rss_conf;
+ key = (uint32_t *)rss_conf.rss_key;
+ hf = rss_conf.rss_hf;
PMD_INIT_FUNC_TRACE(edev);
/* Check if RSS conditions are met.
@@ -553,16 +558,12 @@ qede_config_rss(struct rte_eth_dev *eth_dev,
DP_INFO(edev, "RSS flag is set\n");
- if (rss_conf.rss_hf == 0) {
- DP_NOTICE(edev, false, "No RSS hash function to apply\n");
- return -EINVAL;
- }
+ if (rss_conf.rss_hf == 0)
+ DP_NOTICE(edev, false, "RSS hash function = 0, disables RSS\n");
- if (rss_conf.rss_key != NULL) {
- DP_NOTICE(edev, false,
- "User provided RSS key is not supported\n");
- return -EINVAL;
- }
+ if (rss_conf.rss_key != NULL)
+ memcpy(qdev->rss_params.rss_key, rss_conf.rss_key,
+ rss_conf.rss_key_len);
memset(rss_params, 0, sizeof(*rss_params));
@@ -570,8 +571,23 @@ qede_config_rss(struct rte_eth_dev *eth_dev,
rss_params->rss_ind_table[i] = qede_rxfh_indir_default(i,
QEDE_RSS_CNT(qdev));
- qede_prandom_bytes(rss_params->rss_key,
- sizeof(rss_params->rss_key));
+ /* key and protocols */
+ if (rss_conf.rss_key == NULL)
+ qede_prandom_bytes(rss_params->rss_key,
+ sizeof(rss_params->rss_key));
+ else
+ memcpy(rss_params->rss_key, rss_conf.rss_key,
+ rss_conf.rss_key_len);
+
+ rss_caps = 0;
+ rss_caps |= (hf & ETH_RSS_IPV4) ? ECORE_RSS_IPV4 : 0;
+ rss_caps |= (hf & ETH_RSS_IPV6) ? ECORE_RSS_IPV6 : 0;
+ rss_caps |= (hf & ETH_RSS_IPV6_EX) ? ECORE_RSS_IPV6 : 0;
+ rss_caps |= (hf & ETH_RSS_NONFRAG_IPV4_TCP) ? ECORE_RSS_IPV4_TCP : 0;
+ rss_caps |= (hf & ETH_RSS_NONFRAG_IPV6_TCP) ? ECORE_RSS_IPV6_TCP : 0;
+ rss_caps |= (hf & ETH_RSS_IPV6_TCP_EX) ? ECORE_RSS_IPV6_TCP : 0;
+
+ rss_params->rss_caps = rss_caps;
DP_INFO(edev, "RSS check passes\n");
--
1.7.10.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH v2 2/9] qede: add support for getting rss hash configuration
2016-06-16 5:47 [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1 Rasesh Mody
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 1/9] qede: add support for setting hash configuration Rasesh Mody
@ 2016-06-16 5:47 ` Rasesh Mody
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 3/9] qede: add support for setting rss redirection table Rasesh Mody
` (7 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Rasesh Mody @ 2016-06-16 5:47 UTC (permalink / raw)
To: bruce.richardson; +Cc: dev, Dept-EngDPDKDev, Sony Chacko
From: Sony Chacko <sony.chacko@qlogic.com>
Adding support to get rss hash configuration.
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
---
drivers/net/qede/qede_ethdev.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 84ff6f8..6614632 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -794,6 +794,38 @@ int qede_rss_hash_update(struct rte_eth_dev *eth_dev,
return qdev->ops->vport_update(edev, &vport_update_params);
}
+int qede_rss_hash_conf_get(struct rte_eth_dev *eth_dev,
+ struct rte_eth_rss_conf *rss_conf)
+{
+ struct qede_dev *qdev = eth_dev->data->dev_private;
+ uint64_t hf;
+
+ if (rss_conf->rss_key_len < sizeof(qdev->rss_params.rss_key))
+ return -EINVAL;
+
+ if (rss_conf->rss_key)
+ memcpy(rss_conf->rss_key, qdev->rss_params.rss_key,
+ sizeof(qdev->rss_params.rss_key));
+
+ hf = 0;
+ hf |= (qdev->rss_params.rss_caps & ECORE_RSS_IPV4) ?
+ ETH_RSS_IPV4 : 0;
+ hf |= (qdev->rss_params.rss_caps & ECORE_RSS_IPV6) ?
+ ETH_RSS_IPV6 : 0;
+ hf |= (qdev->rss_params.rss_caps & ECORE_RSS_IPV6) ?
+ ETH_RSS_IPV6_EX : 0;
+ hf |= (qdev->rss_params.rss_caps & ECORE_RSS_IPV4_TCP) ?
+ ETH_RSS_NONFRAG_IPV4_TCP : 0;
+ hf |= (qdev->rss_params.rss_caps & ECORE_RSS_IPV6_TCP) ?
+ ETH_RSS_NONFRAG_IPV6_TCP : 0;
+ hf |= (qdev->rss_params.rss_caps & ECORE_RSS_IPV6_TCP) ?
+ ETH_RSS_IPV6_TCP_EX : 0;
+
+ rss_conf->rss_hf = hf;
+
+ return 0;
+}
+
static const struct eth_dev_ops qede_eth_dev_ops = {
.dev_configure = qede_dev_configure,
.dev_infos_get = qede_dev_info_get,
@@ -822,6 +854,7 @@ static const struct eth_dev_ops qede_eth_dev_ops = {
.flow_ctrl_get = qede_flow_ctrl_get,
.dev_supported_ptypes_get = qede_dev_supported_ptypes_get,
.rss_hash_update = qede_rss_hash_update,
+ .rss_hash_conf_get = qede_rss_hash_conf_get,
};
static const struct eth_dev_ops qede_eth_vf_dev_ops = {
@@ -847,6 +880,7 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = {
.vlan_filter_set = qede_vlan_filter_set,
.dev_supported_ptypes_get = qede_dev_supported_ptypes_get,
.rss_hash_update = qede_rss_hash_update,
+ .rss_hash_conf_get = qede_rss_hash_conf_get,
};
static void qede_update_pf_params(struct ecore_dev *edev)
--
1.7.10.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH v2 3/9] qede: add support for setting rss redirection table
2016-06-16 5:47 [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1 Rasesh Mody
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 1/9] qede: add support for setting hash configuration Rasesh Mody
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 2/9] qede: add support for getting rss " Rasesh Mody
@ 2016-06-16 5:47 ` Rasesh Mody
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 4/9] qede: add support for querying " Rasesh Mody
` (6 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Rasesh Mody @ 2016-06-16 5:47 UTC (permalink / raw)
To: bruce.richardson; +Cc: dev, Dept-EngDPDKDev, Sony Chacko
From: Sony Chacko <sony.chacko@qlogic.com>
Add support to configure rss redirection table and update
corresponding documentation.
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
---
doc/guides/nics/overview.rst | 2 +-
drivers/net/qede/qede_ethdev.c | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/doc/guides/nics/overview.rst b/doc/guides/nics/overview.rst
index 2327f5e..bc3faf8 100644
--- a/doc/guides/nics/overview.rst
+++ b/doc/guides/nics/overview.rst
@@ -103,7 +103,7 @@ Most of these differences are summarized below.
Multicast MAC filter Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
RSS hash Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
RSS key update Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
- RSS reta update Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
+ RSS reta update Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
VMDq Y Y Y Y Y Y Y
SR-IOV Y Y Y Y Y Y Y Y Y Y
DCB Y Y Y Y Y
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 6614632..2b91e09 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -826,6 +826,40 @@ int qede_rss_hash_conf_get(struct rte_eth_dev *eth_dev,
return 0;
}
+int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
+ struct rte_eth_rss_reta_entry64 *reta_conf,
+ uint16_t reta_size)
+{
+ struct qed_update_vport_params vport_update_params;
+ struct qede_dev *qdev = eth_dev->data->dev_private;
+ struct ecore_dev *edev = &qdev->edev;
+ uint16_t i, idx, shift;
+
+ if (reta_size > ETH_RSS_RETA_SIZE_128) {
+ DP_ERR(edev, "reta_size %d is not supported by hardware\n",
+ reta_size);
+ return -EINVAL;
+ }
+
+ memset(&vport_update_params, 0, sizeof(vport_update_params));
+ memcpy(&vport_update_params.rss_params, &qdev->rss_params,
+ sizeof(vport_update_params.rss_params));
+
+ for (i = 0; i < reta_size; i++) {
+ idx = i / RTE_RETA_GROUP_SIZE;
+ shift = i % RTE_RETA_GROUP_SIZE;
+ if (reta_conf[idx].mask & (1ULL << shift)) {
+ uint8_t entry = reta_conf[idx].reta[shift];
+ qdev->rss_params.rss_ind_table[i] = entry;
+ }
+ }
+
+ vport_update_params.update_rss_flg = 1;
+ vport_update_params.vport_id = 0;
+
+ return qdev->ops->vport_update(edev, &vport_update_params);
+}
+
static const struct eth_dev_ops qede_eth_dev_ops = {
.dev_configure = qede_dev_configure,
.dev_infos_get = qede_dev_info_get,
@@ -855,6 +889,7 @@ static const struct eth_dev_ops qede_eth_dev_ops = {
.dev_supported_ptypes_get = qede_dev_supported_ptypes_get,
.rss_hash_update = qede_rss_hash_update,
.rss_hash_conf_get = qede_rss_hash_conf_get,
+ .reta_update = qede_rss_reta_update,
};
static const struct eth_dev_ops qede_eth_vf_dev_ops = {
@@ -881,6 +916,7 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = {
.dev_supported_ptypes_get = qede_dev_supported_ptypes_get,
.rss_hash_update = qede_rss_hash_update,
.rss_hash_conf_get = qede_rss_hash_conf_get,
+ .reta_update = qede_rss_reta_update,
};
static void qede_update_pf_params(struct ecore_dev *edev)
--
1.7.10.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH v2 4/9] qede: add support for querying rss redirection table
2016-06-16 5:47 [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1 Rasesh Mody
` (2 preceding siblings ...)
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 3/9] qede: add support for setting rss redirection table Rasesh Mody
@ 2016-06-16 5:47 ` Rasesh Mody
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 5/9] qede: add support for setting the MTU Rasesh Mody
` (5 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Rasesh Mody @ 2016-06-16 5:47 UTC (permalink / raw)
To: bruce.richardson; +Cc: dev, Dept-EngDPDKDev, Sony Chacko
From: Sony Chacko <sony.chacko@qlogic.com>
Add support for querying rss redirection table.
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
---
drivers/net/qede/qede_ethdev.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 2b91e09..3754454 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -860,6 +860,31 @@ int qede_rss_reta_update(struct rte_eth_dev *eth_dev,
return qdev->ops->vport_update(edev, &vport_update_params);
}
+int qede_rss_reta_query(struct rte_eth_dev *eth_dev,
+ struct rte_eth_rss_reta_entry64 *reta_conf,
+ uint16_t reta_size)
+{
+ struct qede_dev *qdev = eth_dev->data->dev_private;
+ uint16_t i, idx, shift;
+
+ if (reta_size > ETH_RSS_RETA_SIZE_128) {
+ struct ecore_dev *edev = &qdev->edev;
+ DP_ERR(edev, "reta_size %d is not supported\n",
+ reta_size);
+ }
+
+ for (i = 0; i < reta_size; i++) {
+ idx = i / RTE_RETA_GROUP_SIZE;
+ shift = i % RTE_RETA_GROUP_SIZE;
+ if (reta_conf[idx].mask & (1ULL << shift)) {
+ uint8_t entry = qdev->rss_params.rss_ind_table[i];
+ reta_conf[idx].reta[shift] = entry;
+ }
+ }
+
+ return 0;
+}
+
static const struct eth_dev_ops qede_eth_dev_ops = {
.dev_configure = qede_dev_configure,
.dev_infos_get = qede_dev_info_get,
@@ -890,6 +915,7 @@ static const struct eth_dev_ops qede_eth_dev_ops = {
.rss_hash_update = qede_rss_hash_update,
.rss_hash_conf_get = qede_rss_hash_conf_get,
.reta_update = qede_rss_reta_update,
+ .reta_query = qede_rss_reta_query,
};
static const struct eth_dev_ops qede_eth_vf_dev_ops = {
@@ -917,6 +943,7 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = {
.rss_hash_update = qede_rss_hash_update,
.rss_hash_conf_get = qede_rss_hash_conf_get,
.reta_update = qede_rss_reta_update,
+ .reta_query = qede_rss_reta_query,
};
static void qede_update_pf_params(struct ecore_dev *edev)
--
1.7.10.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH v2 5/9] qede: add support for setting the MTU
2016-06-16 5:47 [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1 Rasesh Mody
` (3 preceding siblings ...)
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 4/9] qede: add support for querying " Rasesh Mody
@ 2016-06-16 5:47 ` Rasesh Mody
2016-06-23 15:45 ` Bruce Richardson
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 6/9] qede: add support for xstats Rasesh Mody
` (4 subsequent siblings)
9 siblings, 1 reply; 15+ messages in thread
From: Rasesh Mody @ 2016-06-16 5:47 UTC (permalink / raw)
To: bruce.richardson; +Cc: dev, Dept-EngDPDKDev, Sony Chacko
From: Sony Chacko <sony.chacko@qlogic.com>
Add support for setting the MTU.
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
---
drivers/net/qede/qede_ethdev.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 3754454..af16277 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -885,6 +885,38 @@ int qede_rss_reta_query(struct rte_eth_dev *eth_dev,
return 0;
}
+int qede_set_mtu(struct rte_eth_dev *dev, uint16_t mtu)
+{
+ uint32_t frame_size;
+ struct qede_dev *qdev = dev->data->dev_private;
+ struct rte_eth_dev_info dev_info = {0};
+
+ qede_dev_info_get(dev, &dev_info);
+
+ /* VLAN_TAG = 4 */
+ frame_size = mtu + ETHER_HDR_LEN + ETHER_CRC_LEN + 4;
+
+ if ((mtu < ETHER_MIN_MTU) || (frame_size > dev_info.max_rx_pktlen))
+ return -EINVAL;
+
+ if (!dev->data->scattered_rx &&
+ frame_size > dev->data->min_rx_buf_size - RTE_PKTMBUF_HEADROOM)
+ return -EINVAL;
+
+ if (frame_size > ETHER_MAX_LEN)
+ dev->data->dev_conf.rxmode.jumbo_frame = 1;
+ else
+ dev->data->dev_conf.rxmode.jumbo_frame = 0;
+
+ /* update max frame size */
+ dev->data->dev_conf.rxmode.max_rx_pkt_len = frame_size;
+ qdev->mtu = mtu;
+ qede_dev_stop(dev);
+ qede_dev_start(dev);
+
+ return 0;
+}
+
static const struct eth_dev_ops qede_eth_dev_ops = {
.dev_configure = qede_dev_configure,
.dev_infos_get = qede_dev_info_get,
@@ -916,6 +948,7 @@ static const struct eth_dev_ops qede_eth_dev_ops = {
.rss_hash_conf_get = qede_rss_hash_conf_get,
.reta_update = qede_rss_reta_update,
.reta_query = qede_rss_reta_query,
+ .mtu_set = qede_set_mtu,
};
static const struct eth_dev_ops qede_eth_vf_dev_ops = {
@@ -944,6 +977,7 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = {
.rss_hash_conf_get = qede_rss_hash_conf_get,
.reta_update = qede_rss_reta_update,
.reta_query = qede_rss_reta_query,
+ .mtu_set = qede_set_mtu,
};
static void qede_update_pf_params(struct ecore_dev *edev)
--
1.7.10.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH v2 6/9] qede: add support for xstats
2016-06-16 5:47 [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1 Rasesh Mody
` (4 preceding siblings ...)
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 5/9] qede: add support for setting the MTU Rasesh Mody
@ 2016-06-16 5:47 ` Rasesh Mody
2016-06-28 14:31 ` Thomas Monjalon
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 7/9] qede: add 100g mode support Rasesh Mody
` (3 subsequent siblings)
9 siblings, 1 reply; 15+ messages in thread
From: Rasesh Mody @ 2016-06-16 5:47 UTC (permalink / raw)
To: bruce.richardson; +Cc: dev, Dept-EngDPDKDev, Rasesh Mody
This patch adds support for extended statistics for QEDE PMD.
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
---
doc/guides/nics/overview.rst | 2 +-
drivers/net/qede/qede_ethdev.c | 184 ++++++++++++++++++++++++++++++++++++++--
2 files changed, 177 insertions(+), 9 deletions(-)
diff --git a/doc/guides/nics/overview.rst b/doc/guides/nics/overview.rst
index bc3faf8..8f48076 100644
--- a/doc/guides/nics/overview.rst
+++ b/doc/guides/nics/overview.rst
@@ -128,7 +128,7 @@ Most of these differences are summarized below.
Packet type parsing Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
Timesync Y Y Y Y Y
Basic stats Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
- Extended stats Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
+ Extended stats Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y
Stats per queue Y Y Y Y Y Y Y Y Y Y Y Y Y Y
EEPROM dump Y Y Y Y
Registers dump Y Y Y Y Y Y Y
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index af16277..c2d030c 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -12,6 +12,146 @@
static const struct qed_eth_ops *qed_ops;
static const char *drivername = "qede pmd";
+static const struct rte_eth_xstats qede_eth_stats[] = {
+ {"rx_unicast_bytes", offsetof(struct ecore_eth_stats, rx_ucast_bytes)},
+ {"rx_multicast_bytes",
+ offsetof(struct ecore_eth_stats, rx_mcast_bytes)},
+ {"rx_broadcast_bytes",
+ offsetof(struct ecore_eth_stats, rx_bcast_bytes)},
+ {"rx_unicast_packets", offsetof(struct ecore_eth_stats, rx_ucast_pkts)},
+ {"rx_multicast_packets",
+ offsetof(struct ecore_eth_stats, rx_mcast_pkts)},
+ {"rx_broadcast_packets",
+ offsetof(struct ecore_eth_stats, rx_bcast_pkts)},
+
+ {"tx_unicast_bytes", offsetof(struct ecore_eth_stats, tx_ucast_bytes)},
+ {"tx_multicast_bytes",
+ offsetof(struct ecore_eth_stats, tx_mcast_bytes)},
+ {"tx_broadcast_bytes",
+ offsetof(struct ecore_eth_stats, tx_bcast_bytes)},
+ {"tx_unicast_packets", offsetof(struct ecore_eth_stats, tx_ucast_pkts)},
+ {"tx_multicast_packets",
+ offsetof(struct ecore_eth_stats, tx_mcast_pkts)},
+ {"tx_broadcast_packets",
+ offsetof(struct ecore_eth_stats, tx_bcast_pkts)},
+
+ {"rx_64_byte_packets",
+ offsetof(struct ecore_eth_stats, rx_64_byte_packets)},
+ {"rx_65_to_127_byte_packets",
+ offsetof(struct ecore_eth_stats, rx_65_to_127_byte_packets)},
+ {"rx_128_to_255_byte_packets",
+ offsetof(struct ecore_eth_stats, rx_128_to_255_byte_packets)},
+ {"rx_256_to_511_byte_packets",
+ offsetof(struct ecore_eth_stats, rx_256_to_511_byte_packets)},
+ {"rx_512_to_1023_byte_packets",
+ offsetof(struct ecore_eth_stats, rx_512_to_1023_byte_packets)},
+ {"rx_1024_to_1518_byte_packets",
+ offsetof(struct ecore_eth_stats, rx_1024_to_1518_byte_packets)},
+ {"rx_1519_to_1522_byte_packets",
+ offsetof(struct ecore_eth_stats, rx_1519_to_1522_byte_packets)},
+ {"rx_1519_to_2047_byte_packets",
+ offsetof(struct ecore_eth_stats, rx_1519_to_2047_byte_packets)},
+ {"rx_2048_to_4095_byte_packets",
+ offsetof(struct ecore_eth_stats, rx_2048_to_4095_byte_packets)},
+ {"rx_4096_to_9216_byte_packets",
+ offsetof(struct ecore_eth_stats, rx_4096_to_9216_byte_packets)},
+ {"rx_9217_to_16383_byte_packets",
+ offsetof(struct ecore_eth_stats,
+ rx_9217_to_16383_byte_packets)},
+ {"tx_64_byte_packets",
+ offsetof(struct ecore_eth_stats, tx_64_byte_packets)},
+ {"tx_65_to_127_byte_packets",
+ offsetof(struct ecore_eth_stats, tx_65_to_127_byte_packets)},
+ {"tx_128_to_255_byte_packets",
+ offsetof(struct ecore_eth_stats, tx_128_to_255_byte_packets)},
+ {"tx_256_to_511_byte_packets",
+ offsetof(struct ecore_eth_stats, tx_256_to_511_byte_packets)},
+ {"tx_512_to_1023_byte_packets",
+ offsetof(struct ecore_eth_stats, tx_512_to_1023_byte_packets)},
+ {"tx_1024_to_1518_byte_packets",
+ offsetof(struct ecore_eth_stats, tx_1024_to_1518_byte_packets)},
+ {"trx_1519_to_1522_byte_packets",
+ offsetof(struct ecore_eth_stats, tx_1519_to_2047_byte_packets)},
+ {"tx_2048_to_4095_byte_packets",
+ offsetof(struct ecore_eth_stats, tx_2048_to_4095_byte_packets)},
+ {"tx_4096_to_9216_byte_packets",
+ offsetof(struct ecore_eth_stats, tx_4096_to_9216_byte_packets)},
+ {"tx_9217_to_16383_byte_packets",
+ offsetof(struct ecore_eth_stats,
+ tx_9217_to_16383_byte_packets)},
+
+ {"rx_mac_crtl_frames",
+ offsetof(struct ecore_eth_stats, rx_mac_crtl_frames)},
+ {"tx_mac_control_frames",
+ offsetof(struct ecore_eth_stats, tx_mac_ctrl_frames)},
+ {"rx_pause_frames", offsetof(struct ecore_eth_stats, rx_pause_frames)},
+ {"tx_pause_frames", offsetof(struct ecore_eth_stats, tx_pause_frames)},
+ {"rx_priority_flow_control_frames",
+ offsetof(struct ecore_eth_stats, rx_pfc_frames)},
+ {"tx_priority_flow_control_frames",
+ offsetof(struct ecore_eth_stats, tx_pfc_frames)},
+
+ {"rx_crc_errors", offsetof(struct ecore_eth_stats, rx_crc_errors)},
+ {"rx_align_errors", offsetof(struct ecore_eth_stats, rx_align_errors)},
+ {"rx_carrier_errors",
+ offsetof(struct ecore_eth_stats, rx_carrier_errors)},
+ {"rx_oversize_packet_errors",
+ offsetof(struct ecore_eth_stats, rx_oversize_packets)},
+ {"rx_jabber_errors", offsetof(struct ecore_eth_stats, rx_jabbers)},
+ {"rx_undersize_packet_errors",
+ offsetof(struct ecore_eth_stats, rx_undersize_packets)},
+ {"rx_fragments", offsetof(struct ecore_eth_stats, rx_fragments)},
+ {"rx_host_buffer_not_available",
+ offsetof(struct ecore_eth_stats, no_buff_discards)},
+ /* Number of packets discarded because they are bigger than MTU */
+ {"rx_packet_too_big_discards",
+ offsetof(struct ecore_eth_stats, packet_too_big_discard)},
+ {"rx_ttl_zero_discards",
+ offsetof(struct ecore_eth_stats, ttl0_discard)},
+ {"rx_multi_function_tag_filter_discards",
+ offsetof(struct ecore_eth_stats, mftag_filter_discards)},
+ {"rx_mac_filter_discards",
+ offsetof(struct ecore_eth_stats, mac_filter_discards)},
+ {"rx_hw_buffer_truncates",
+ offsetof(struct ecore_eth_stats, brb_truncates)},
+ {"rx_hw_buffer_discards",
+ offsetof(struct ecore_eth_stats, brb_discards)},
+ {"tx_lpi_entry_count",
+ offsetof(struct ecore_eth_stats, tx_lpi_entry_count)},
+ {"tx_total_collisions",
+ offsetof(struct ecore_eth_stats, tx_total_collisions)},
+ {"tx_error_drop_packets",
+ offsetof(struct ecore_eth_stats, tx_err_drop_pkts)},
+
+ {"rx_mac_bytes", offsetof(struct ecore_eth_stats, rx_mac_bytes)},
+ {"rx_mac_unicast_packets",
+ offsetof(struct ecore_eth_stats, rx_mac_uc_packets)},
+ {"rx_mac_multicast_packets",
+ offsetof(struct ecore_eth_stats, rx_mac_mc_packets)},
+ {"rx_mac_broadcast_packets",
+ offsetof(struct ecore_eth_stats, rx_mac_bc_packets)},
+ {"rx_mac_frames_ok",
+ offsetof(struct ecore_eth_stats, rx_mac_frames_ok)},
+ {"tx_mac_bytes", offsetof(struct ecore_eth_stats, tx_mac_bytes)},
+ {"tx_mac_unicast_packets",
+ offsetof(struct ecore_eth_stats, tx_mac_uc_packets)},
+ {"tx_mac_multicast_packets",
+ offsetof(struct ecore_eth_stats, tx_mac_mc_packets)},
+ {"tx_mac_broadcast_packets",
+ offsetof(struct ecore_eth_stats, tx_mac_bc_packets)},
+
+ {"lro_coalesced_packets",
+ offsetof(struct ecore_eth_stats, tpa_coalesced_pkts)},
+ {"lro_coalesced_events",
+ offsetof(struct ecore_eth_stats, tpa_coalesced_events)},
+ {"lro_aborts_num",
+ offsetof(struct ecore_eth_stats, tpa_aborts_num)},
+ {"lro_not_coalesced_packets",
+ offsetof(struct ecore_eth_stats, tpa_not_coalesced_pkts)},
+ {"lro_coalesced_bytes",
+ offsetof(struct ecore_eth_stats, tpa_coalesced_bytes)},
+};
+
static void qede_interrupt_action(struct ecore_hwfn *p_hwfn)
{
ecore_int_sp_dpc((osal_int_ptr_t)(p_hwfn));
@@ -611,15 +751,39 @@ qede_get_stats(struct rte_eth_dev *eth_dev, struct rte_eth_stats *eth_stats)
stats.tx_mcast_bytes + stats.tx_bcast_bytes;
eth_stats->oerrors = stats.tx_err_drop_pkts;
+}
+
+static int
+qede_get_xstats(struct rte_eth_dev *dev, struct rte_eth_xstats *xstats,
+ unsigned int n)
+{
+ struct qede_dev *qdev = dev->data->dev_private;
+ struct ecore_dev *edev = &qdev->edev;
+ struct ecore_eth_stats stats;
+ unsigned int num = RTE_DIM(qede_eth_stats);
+
+ if (n < num)
+ return num;
+
+ qdev->ops->get_vport_stats(edev, &stats);
+
+ for (num = 0; num < n; num++) {
+ snprintf(xstats[num].name, sizeof(xstats[num].name), "%s",
+ qede_eth_stats[num].name);
+ xstats[num].value = *(u64 *)(((char *)&stats) +
+ qede_eth_stats[num].value);
+ }
- DP_INFO(edev,
- "no_buff_discards=%" PRIu64 ""
- " mac_filter_discards=%" PRIu64 ""
- " brb_truncates=%" PRIu64 ""
- " brb_discards=%" PRIu64 "\n",
- stats.no_buff_discards,
- stats.mac_filter_discards,
- stats.brb_truncates, stats.brb_discards);
+ return num;
+}
+
+static void
+qede_reset_xstats(struct rte_eth_dev *dev)
+{
+ struct qede_dev *qdev = dev->data->dev_private;
+ struct ecore_dev *edev = &qdev->edev;
+
+ ecore_reset_vport_stats(edev);
}
int qede_dev_set_link_state(struct rte_eth_dev *eth_dev, bool link_up)
@@ -936,6 +1100,8 @@ static const struct eth_dev_ops qede_eth_dev_ops = {
.dev_close = qede_dev_close,
.stats_get = qede_get_stats,
.stats_reset = qede_reset_stats,
+ .xstats_get = qede_get_xstats,
+ .xstats_reset = qede_reset_xstats,
.mac_addr_add = qede_mac_addr_add,
.mac_addr_remove = qede_mac_addr_remove,
.mac_addr_set = qede_mac_addr_set,
@@ -970,6 +1136,8 @@ static const struct eth_dev_ops qede_eth_vf_dev_ops = {
.dev_close = qede_dev_close,
.stats_get = qede_get_stats,
.stats_reset = qede_reset_stats,
+ .xstats_get = qede_get_xstats,
+ .xstats_reset = qede_reset_xstats,
.vlan_offload_set = qede_vlan_offload_set,
.vlan_filter_set = qede_vlan_filter_set,
.dev_supported_ptypes_get = qede_dev_supported_ptypes_get,
--
1.7.10.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH v2 7/9] qede: add 100g mode support
2016-06-16 5:47 [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1 Rasesh Mody
` (5 preceding siblings ...)
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 6/9] qede: add support for xstats Rasesh Mody
@ 2016-06-16 5:47 ` Rasesh Mody
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 8/9] qede: update vport filter settings Rasesh Mody
` (2 subsequent siblings)
9 siblings, 0 replies; 15+ messages in thread
From: Rasesh Mody @ 2016-06-16 5:47 UTC (permalink / raw)
To: bruce.richardson; +Cc: dev, Dept-EngDPDKDev, Harish Patil
From: Harish Patil <harish.patil@qlogic.com>
Change details:
- Add device id to the PCI table
- Add polling for the slowpath events for CMT mode device
- Add prerequisites to allow 100g mode
o Min number of queues needed is 2
o Only even number of queues are allowed
- Update documentation
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
---
config/common_base | 2 +-
doc/guides/nics/qede.rst | 8 ++---
drivers/net/qede/qede_ethdev.c | 64 ++++++++++++++++++++++++++++++++++++++++
drivers/net/qede/qede_ethdev.h | 4 ++-
4 files changed, 72 insertions(+), 6 deletions(-)
diff --git a/config/common_base b/config/common_base
index aeb572e..ee4cf4d 100644
--- a/config/common_base
+++ b/config/common_base
@@ -297,7 +297,7 @@ CONFIG_RTE_LIBRTE_PMD_BOND=y
CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB=n
CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB_L1=n
-# QLogic 25G/40G PMD
+# QLogic 25G/40G/100G PMD
#
CONFIG_RTE_LIBRTE_QEDE_PMD=n
CONFIG_RTE_LIBRTE_QEDE_DEBUG_INIT=n
diff --git a/doc/guides/nics/qede.rst b/doc/guides/nics/qede.rst
index c5fbd83..f7ca8eb 100644
--- a/doc/guides/nics/qede.rst
+++ b/doc/guides/nics/qede.rst
@@ -55,7 +55,7 @@ Supported Features
- TSS
- Multiple MAC address
- Default pause flow control
-- SR-IOV VF
+- SR-IOV VF for 25G/40G modes
Non-supported Features
----------------------
@@ -70,13 +70,13 @@ Non-supported Features
Supported QLogic Adapters
-------------------------
-- QLogic FastLinQ QL4xxxx 25G/40G CNAs
+- QLogic FastLinQ QL4xxxx 25G/40G/100G CNAs.
Prerequisites
-------------
-- Requires firmware version **8.7.x.** and management
- firmware version **8.7.x or higher**. Firmware may be available
+- Requires firmware version **8.7.x.** and management firmware
+ version **8.7.x or higher**. Firmware may be available
inbox in certain newer Linux distros under the standard directory
``E.g. /lib/firmware/qed/qed_init_values_zipped-8.7.7.0.bin``
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index c2d030c..d32f7b3 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -7,10 +7,12 @@
*/
#include "qede_ethdev.h"
+#include <rte_alarm.h>
/* Globals */
static const struct qed_eth_ops *qed_ops;
static const char *drivername = "qede pmd";
+static int64_t timer_period = 1;
static const struct rte_eth_xstats qede_eth_stats[] = {
{"rx_unicast_bytes", offsetof(struct ecore_eth_stats, rx_ucast_bytes)},
@@ -498,6 +500,21 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev)
return -EINVAL;
}
+ /* Check requirements for 100G mode */
+ if (edev->num_hwfns > 1) {
+ if (eth_dev->data->nb_rx_queues < 2) {
+ DP_NOTICE(edev, false,
+ "100G mode requires minimum two queues\n");
+ return -EINVAL;
+ }
+
+ if ((eth_dev->data->nb_rx_queues % 2) != 0) {
+ DP_NOTICE(edev, false,
+ "100G mode requires even number of queues\n");
+ return -EINVAL;
+ }
+ }
+
qdev->num_rss = eth_dev->data->nb_rx_queues;
/* Initial state */
@@ -680,6 +697,26 @@ static void qede_promiscuous_disable(struct rte_eth_dev *eth_dev)
qede_rx_mode_setting(eth_dev, QED_FILTER_RX_MODE_TYPE_REGULAR);
}
+static void qede_poll_sp_sb_cb(void *param)
+{
+ struct rte_eth_dev *eth_dev = (struct rte_eth_dev *)param;
+ struct qede_dev *qdev = QEDE_INIT_QDEV(eth_dev);
+ struct ecore_dev *edev = QEDE_INIT_EDEV(qdev);
+ int rc;
+
+ qede_interrupt_action(ECORE_LEADING_HWFN(edev));
+ qede_interrupt_action(&edev->hwfns[1]);
+
+ rc = rte_eal_alarm_set(timer_period * US_PER_S,
+ qede_poll_sp_sb_cb,
+ (void *)eth_dev);
+ if (rc != 0) {
+ DP_ERR(edev, "Unable to start periodic"
+ " timer rc %d\n", rc);
+ assert(false && "Unable to start periodic timer");
+ }
+}
+
static void qede_dev_close(struct rte_eth_dev *eth_dev)
{
struct qede_dev *qdev = eth_dev->data->dev_private;
@@ -712,6 +749,9 @@ static void qede_dev_close(struct rte_eth_dev *eth_dev)
rte_intr_callback_unregister(ð_dev->pci_dev->intr_handle,
qede_interrupt_handler, (void *)eth_dev);
+ if (edev->num_hwfns > 1)
+ rte_eal_alarm_cancel(qede_poll_sp_sb_cb, (void *)eth_dev);
+
qdev->state = QEDE_CLOSE;
}
@@ -1238,9 +1278,26 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
params.drv_eng = QEDE_ENGINEERING_VERSION;
strncpy((char *)params.name, "qede LAN", QED_DRV_VER_STR_SIZE);
+ /* For CMT mode device do periodic polling for slowpath events.
+ * This is required since uio device uses only one MSI-x
+ * interrupt vector but we need one for each engine.
+ */
+ if (edev->num_hwfns > 1) {
+ rc = rte_eal_alarm_set(timer_period * US_PER_S,
+ qede_poll_sp_sb_cb,
+ (void *)eth_dev);
+ if (rc != 0) {
+ DP_ERR(edev, "Unable to start periodic"
+ " timer rc %d\n", rc);
+ return -EINVAL;
+ }
+ }
+
rc = qed_ops->common->slowpath_start(edev, ¶ms);
if (rc) {
DP_ERR(edev, "Cannot start slowpath rc = %d\n", rc);
+ rte_eal_alarm_cancel(qede_poll_sp_sb_cb,
+ (void *)eth_dev);
return -ENODEV;
}
@@ -1249,6 +1306,8 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
DP_ERR(edev, "Cannot get device_info rc %d\n", rc);
qed_ops->common->slowpath_stop(edev);
qed_ops->common->remove(edev);
+ rte_eal_alarm_cancel(qede_poll_sp_sb_cb,
+ (void *)eth_dev);
return -ENODEV;
}
@@ -1274,6 +1333,8 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
DP_ERR(edev, "Failed to allocate MAC address\n");
qed_ops->common->slowpath_stop(edev);
qed_ops->common->remove(edev);
+ rte_eal_alarm_cancel(qede_poll_sp_sb_cb,
+ (void *)eth_dev);
return -ENOMEM;
}
@@ -1389,6 +1450,9 @@ static struct rte_pci_id pci_id_qede_map[] = {
{
QEDE_RTE_PCI_DEVICE(PCI_DEVICE_ID_57980S_25)
},
+ {
+ QEDE_RTE_PCI_DEVICE(PCI_DEVICE_ID_57980S_100)
+ },
{.vendor_id = 0,}
};
diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h
index 64d5f08..b080f5f 100644
--- a/drivers/net/qede/qede_ethdev.h
+++ b/drivers/net/qede/qede_ethdev.h
@@ -81,7 +81,7 @@
struct ecore_dev *edev = &qdev->edev; \
}
-/************* QLogic 25G/40G vendor/devices ids *************/
+/************* QLogic 25G/40G/100G vendor/devices ids *************/
#define PCI_VENDOR_ID_QLOGIC 0x1077
#define CHIP_NUM_57980E 0x1634
@@ -90,6 +90,7 @@
#define CHIP_NUM_57980S_40 0x1634
#define CHIP_NUM_57980S_25 0x1656
#define CHIP_NUM_57980S_IOV 0x1664
+#define CHIP_NUM_57980S_100 0x1644
#define PCI_DEVICE_ID_NX2_57980E CHIP_NUM_57980E
#define PCI_DEVICE_ID_NX2_57980S CHIP_NUM_57980S
@@ -97,6 +98,7 @@
#define PCI_DEVICE_ID_57980S_40 CHIP_NUM_57980S_40
#define PCI_DEVICE_ID_57980S_25 CHIP_NUM_57980S_25
#define PCI_DEVICE_ID_57980S_IOV CHIP_NUM_57980S_IOV
+#define PCI_DEVICE_ID_57980S_100 CHIP_NUM_57980S_100
extern char fw_file[];
--
1.7.10.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH v2 8/9] qede: update vport filter settings
2016-06-16 5:47 [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1 Rasesh Mody
` (6 preceding siblings ...)
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 7/9] qede: add 100g mode support Rasesh Mody
@ 2016-06-16 5:47 ` Rasesh Mody
2016-06-23 15:46 ` Bruce Richardson
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 9/9] qede: update version to 8.7.9.0_1.1.0.1 Rasesh Mody
2016-06-23 15:49 ` [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1 Bruce Richardson
9 siblings, 1 reply; 15+ messages in thread
From: Rasesh Mody @ 2016-06-16 5:47 UTC (permalink / raw)
To: bruce.richardson; +Cc: dev, Dept-EngDPDKDev, Sony Chacko
From: Sony Chacko <sony.chacko@qlogic.com>
Enable promiscuous mode filter settings.
Check for VF mode and enable promiscuous mode settings for VF.
Check filter configuration to ensure conflicting filter modes
are not set.
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
---
drivers/net/qede/base/ecore_l2.c | 19 +++++++++++-----
drivers/net/qede/qede_eth_if.c | 45 +++++++++++++++++++++-----------------
2 files changed, 39 insertions(+), 25 deletions(-)
diff --git a/drivers/net/qede/base/ecore_l2.c b/drivers/net/qede/base/ecore_l2.c
index 8a1a26a..9e6ef5a 100644
--- a/drivers/net/qede/base/ecore_l2.c
+++ b/drivers/net/qede/base/ecore_l2.c
@@ -227,11 +227,11 @@ ecore_sp_update_accept_mode(struct ecore_hwfn *p_hwfn,
* SET_FIELD(*state, ETH_VPORT_RX_MODE_UCAST_DROP_ALL,
* !!(accept_filter & ECORE_ACCEPT_NONE));
*/
-/*
- * SET_FIELD(*state, ETH_VPORT_RX_MODE_UCAST_ACCEPT_ALL,
- * (!!(accept_filter & ECORE_ACCEPT_UCAST_MATCHED) &&
- * !!(accept_filter & ECORE_ACCEPT_UCAST_UNMATCHED)));
- */
+
+ SET_FIELD(*state, ETH_VPORT_RX_MODE_UCAST_ACCEPT_ALL,
+ (!!(accept_filter & ECORE_ACCEPT_UCAST_MATCHED) &&
+ !!(accept_filter & ECORE_ACCEPT_UCAST_UNMATCHED)));
+
SET_FIELD(*state, ETH_VPORT_RX_MODE_UCAST_DROP_ALL,
!(!!(accept_filter & ECORE_ACCEPT_UCAST_MATCHED) ||
!!(accept_filter & ECORE_ACCEPT_UCAST_UNMATCHED)));
@@ -275,6 +275,15 @@ ecore_sp_update_accept_mode(struct ecore_hwfn *p_hwfn,
SET_FIELD(*state, ETH_VPORT_TX_MODE_BCAST_ACCEPT_ALL,
!!(accept_filter & ECORE_ACCEPT_BCAST));
+ /* @DPDK */
+ /* ETH_VPORT_RX_MODE_UCAST_ACCEPT_ALL and
+ * ETH_VPORT_TX_MODE_UCAST_ACCEPT_ALL
+ * needs to be set for VF-VF communication to work
+ * when dest macaddr is unknown.
+ */
+ SET_FIELD(*state, ETH_VPORT_TX_MODE_UCAST_ACCEPT_ALL,
+ (!!(accept_filter & ECORE_ACCEPT_UCAST_MATCHED) &&
+ !!(accept_filter & ECORE_ACCEPT_UCAST_UNMATCHED)));
DP_VERBOSE(p_hwfn, ECORE_MSG_SP,
"p_ramrod->tx_mode.state = 0x%x\n",
diff --git a/drivers/net/qede/qede_eth_if.c b/drivers/net/qede/qede_eth_if.c
index fd07d8b..b6f6487 100644
--- a/drivers/net/qede/qede_eth_if.c
+++ b/drivers/net/qede/qede_eth_if.c
@@ -377,33 +377,38 @@ qed_configure_filter_mcast(struct ecore_dev *edev,
return ecore_filter_mcast_cmd(edev, &mcast, ECORE_SPQ_MODE_CB, NULL);
}
-int
-qed_configure_filter_rx_mode(struct ecore_dev *edev,
- enum qed_filter_rx_mode_type type)
+int qed_configure_filter_rx_mode(struct ecore_dev *edev,
+ enum qed_filter_rx_mode_type type)
{
- struct ecore_filter_accept_flags accept_flags;
+ struct ecore_filter_accept_flags flags;
- memset(&accept_flags, 0, sizeof(accept_flags));
+ memset(&flags, 0, sizeof(flags));
- accept_flags.update_rx_mode_config = 1;
- accept_flags.update_tx_mode_config = 1;
- accept_flags.rx_accept_filter = ECORE_ACCEPT_UCAST_MATCHED |
- ECORE_ACCEPT_MCAST_MATCHED |
- ECORE_ACCEPT_BCAST;
- accept_flags.tx_accept_filter = ECORE_ACCEPT_UCAST_MATCHED |
+ flags.update_rx_mode_config = 1;
+ flags.update_tx_mode_config = 1;
+ flags.rx_accept_filter = ECORE_ACCEPT_UCAST_MATCHED |
ECORE_ACCEPT_MCAST_MATCHED |
ECORE_ACCEPT_BCAST;
- if (type == QED_FILTER_RX_MODE_TYPE_PROMISC)
- accept_flags.rx_accept_filter |= ECORE_ACCEPT_UCAST_UNMATCHED;
- else if (type == QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC)
- accept_flags.rx_accept_filter |= ECORE_ACCEPT_MCAST_UNMATCHED;
- else if (type == (QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC |
- QED_FILTER_RX_MODE_TYPE_PROMISC))
- accept_flags.rx_accept_filter |= ECORE_ACCEPT_UCAST_UNMATCHED |
- ECORE_ACCEPT_MCAST_UNMATCHED;
+ flags.tx_accept_filter = ECORE_ACCEPT_UCAST_MATCHED |
+ ECORE_ACCEPT_MCAST_MATCHED |
+ ECORE_ACCEPT_BCAST;
+
+ if (type == QED_FILTER_RX_MODE_TYPE_PROMISC) {
+ flags.rx_accept_filter |= ECORE_ACCEPT_UCAST_UNMATCHED;
+ if (IS_VF(edev)) {
+ flags.tx_accept_filter |= ECORE_ACCEPT_UCAST_UNMATCHED;
+ DP_INFO(edev, "Enabling Tx unmatched flag for VF\n");
+ }
+ } else if (type == QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC) {
+ flags.rx_accept_filter |= ECORE_ACCEPT_MCAST_UNMATCHED;
+ } else if (type == (QED_FILTER_RX_MODE_TYPE_MULTI_PROMISC |
+ QED_FILTER_RX_MODE_TYPE_PROMISC)) {
+ flags.rx_accept_filter |= ECORE_ACCEPT_UCAST_UNMATCHED |
+ ECORE_ACCEPT_MCAST_UNMATCHED;
+ }
- return ecore_filter_accept_cmd(edev, 0, accept_flags, false, false,
+ return ecore_filter_accept_cmd(edev, 0, flags, false, false,
ECORE_SPQ_MODE_CB, NULL);
}
--
1.7.10.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* [dpdk-dev] [PATCH v2 9/9] qede: update version to 8.7.9.0_1.1.0.1
2016-06-16 5:47 [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1 Rasesh Mody
` (7 preceding siblings ...)
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 8/9] qede: update vport filter settings Rasesh Mody
@ 2016-06-16 5:47 ` Rasesh Mody
2016-06-23 15:49 ` [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1 Bruce Richardson
9 siblings, 0 replies; 15+ messages in thread
From: Rasesh Mody @ 2016-06-16 5:47 UTC (permalink / raw)
To: bruce.richardson; +Cc: dev, Dept-EngDPDKDev, Harish Patil
From: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Harish Patil <harish.patil@qlogic.com>
---
drivers/net/qede/qede_ethdev.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/qede/qede_ethdev.h b/drivers/net/qede/qede_ethdev.h
index b080f5f..abb33af 100644
--- a/drivers/net/qede/qede_ethdev.h
+++ b/drivers/net/qede/qede_ethdev.h
@@ -40,9 +40,9 @@
/* Driver versions */
#define QEDE_PMD_VER_PREFIX "QEDE PMD"
#define QEDE_PMD_VERSION_MAJOR 1
-#define QEDE_PMD_VERSION_MINOR 0
-#define QEDE_PMD_VERSION_REVISION 6
-#define QEDE_PMD_VERSION_PATCH 1
+#define QEDE_PMD_VERSION_MINOR 1
+#define QEDE_PMD_VERSION_REVISION 0
+#define QEDE_PMD_VERSION_PATCH 1
#define QEDE_MAJOR_VERSION 8
#define QEDE_MINOR_VERSION 7
--
1.7.10.3
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v2 5/9] qede: add support for setting the MTU
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 5/9] qede: add support for setting the MTU Rasesh Mody
@ 2016-06-23 15:45 ` Bruce Richardson
0 siblings, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2016-06-23 15:45 UTC (permalink / raw)
To: Rasesh Mody; +Cc: dev, Dept-EngDPDKDev, Sony Chacko
On Wed, Jun 15, 2016 at 10:47:07PM -0700, Rasesh Mody wrote:
> From: Sony Chacko <sony.chacko@qlogic.com>
>
> Add support for setting the MTU.
>
> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
> ---
Patch is missing an update to overview.rst for the new feature support.
If there is no objection, I'll add that into it on apply for you.
/Bruce
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v2 8/9] qede: update vport filter settings
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 8/9] qede: update vport filter settings Rasesh Mody
@ 2016-06-23 15:46 ` Bruce Richardson
0 siblings, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2016-06-23 15:46 UTC (permalink / raw)
To: Rasesh Mody; +Cc: dev, Dept-EngDPDKDev, Sony Chacko
On Wed, Jun 15, 2016 at 10:47:10PM -0700, Rasesh Mody wrote:
> From: Sony Chacko <sony.chacko@qlogic.com>
>
> Enable promiscuous mode filter settings.
> Check for VF mode and enable promiscuous mode settings for VF.
> Check filter configuration to ensure conflicting filter modes
> are not set.
>
> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
I think the title on the V1 patch is actually a better one for this patch as
it describes the overall goal of the patch rather than talking about the low
level details.
On apply, I'll therefore merge in the title and intro from the V1 patch with
the additional detail in the commit message from this V2.
Regards,
/Bruce
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1
2016-06-16 5:47 [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1 Rasesh Mody
` (8 preceding siblings ...)
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 9/9] qede: update version to 8.7.9.0_1.1.0.1 Rasesh Mody
@ 2016-06-23 15:49 ` Bruce Richardson
9 siblings, 0 replies; 15+ messages in thread
From: Bruce Richardson @ 2016-06-23 15:49 UTC (permalink / raw)
To: Rasesh Mody; +Cc: dev, Dept-EngDPDKDev
On Wed, Jun 15, 2016 at 10:47:02PM -0700, Rasesh Mody wrote:
> Hi Bruce,
>
> v2 series:
> - made subject and description of the patches verbose where needed.
> - extended stats patch: some of the stats may sound similar, however,
> they are different stats collected by different hw componenets
> (eg. mac, rx pipeline, etc). We've tried our best to elaborate each
> stat as applicable and provided a direction. All other comments on
> the patch addressed.
>
> This patch set adds support for enabling 100G mode for QEDE PMD.
> It also adds support for APIs like
> - mtu_set
> - reta_update
> - reta_query
> - rss_hash_update
> - rss_hash_conf_get
> - xstats_get
> The changes include enablement of vf-vf traffic and updated the driver
> version to 8.7.9.0_1.1.0.1
>
> The patches have been generated and tested against dpdk-next-net rel_16_07
> branch.
>
> Please apply!
>
Applied to dpdk-next-net/rel_16_07 with previously flagged commit message and
doc changes.
Regards,
/Bruce
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v2 6/9] qede: add support for xstats
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 6/9] qede: add support for xstats Rasesh Mody
@ 2016-06-28 14:31 ` Thomas Monjalon
2016-06-29 0:08 ` Rasesh Mody
0 siblings, 1 reply; 15+ messages in thread
From: Thomas Monjalon @ 2016-06-28 14:31 UTC (permalink / raw)
To: Rasesh Mody; +Cc: dev, bruce.richardson, Dept-EngDPDKDev, remy.horton
2016-06-15 22:47, Rasesh Mody:
> This patch adds support for extended statistics for QEDE PMD.
>
> Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
This qede patch and a bnx2x one cannot be merged in master tree
because of an API change:
http://dpdk.org/commit/bd6aa172
http://dpdk.org/commit/e2aae1c1
Please could you rework this patch for RC2?
Sorry for the inconvenience, I should have caught it earlier.
We'll try to synchronize the branches more often in future.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [dpdk-dev] [PATCH v2 6/9] qede: add support for xstats
2016-06-28 14:31 ` Thomas Monjalon
@ 2016-06-29 0:08 ` Rasesh Mody
0 siblings, 0 replies; 15+ messages in thread
From: Rasesh Mody @ 2016-06-29 0:08 UTC (permalink / raw)
To: Thomas Monjalon; +Cc: dev, bruce.richardson, Dept-Eng DPDK Dev, remy.horton
> From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com]
> Sent: Tuesday, June 28, 2016 7:32 AM
>
> 2016-06-15 22:47, Rasesh Mody:
> > This patch adds support for extended statistics for QEDE PMD.
> >
> > Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
>
> This qede patch and a bnx2x one cannot be merged in master tree because
> of an API change:
> http://dpdk.org/commit/bd6aa172
> http://dpdk.org/commit/e2aae1c1
> Please could you rework this patch for RC2?
>
> Sorry for the inconvenience, I should have caught it earlier.
> We'll try to synchronize the branches more often in future.
Will work on it and submit patches to incorporate the API change.
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2016-06-29 0:08 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-16 5:47 [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1 Rasesh Mody
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 1/9] qede: add support for setting hash configuration Rasesh Mody
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 2/9] qede: add support for getting rss " Rasesh Mody
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 3/9] qede: add support for setting rss redirection table Rasesh Mody
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 4/9] qede: add support for querying " Rasesh Mody
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 5/9] qede: add support for setting the MTU Rasesh Mody
2016-06-23 15:45 ` Bruce Richardson
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 6/9] qede: add support for xstats Rasesh Mody
2016-06-28 14:31 ` Thomas Monjalon
2016-06-29 0:08 ` Rasesh Mody
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 7/9] qede: add 100g mode support Rasesh Mody
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 8/9] qede: update vport filter settings Rasesh Mody
2016-06-23 15:46 ` Bruce Richardson
2016-06-16 5:47 ` [dpdk-dev] [PATCH v2 9/9] qede: update version to 8.7.9.0_1.1.0.1 Rasesh Mody
2016-06-23 15:49 ` [dpdk-dev] [PATCH v2 0/9] qede: update qede PMD to 1.1.0.1 Bruce Richardson
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).