DPDK patches and discussions
 help / color / mirror / Atom feed
From: Helin Zhang <helin.zhang@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 4/6] i40e: fill the hash key size
Date: Thu,  4 Jun 2015 15:33:34 +0800	[thread overview]
Message-ID: <1433403216-7114-5-git-send-email-helin.zhang@intel.com> (raw)
In-Reply-To: <1433403216-7114-1-git-send-email-helin.zhang@intel.com>

The correct hash key size in bytes should be filled into the
'struct rte_eth_dev_info', to support querying it.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c    | 4 ++++
 drivers/net/i40e/i40e_ethdev_vf.c | 4 ++++
 2 files changed, 8 insertions(+)

v2 changes:
* Disabled the code changes by default, to avoid breaking ABI compatibility.

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index da6c0b5..63c76a6 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -1540,6 +1540,10 @@ i40e_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 		DEV_TX_OFFLOAD_SCTP_CKSUM |
 		DEV_TX_OFFLOAD_OUTER_IPV4_CKSUM |
 		DEV_TX_OFFLOAD_TCP_TSO;
+#ifdef RTE_QUERY_HASH_KEY_SIZE
+	dev_info->hash_key_size = (I40E_PFQF_HKEY_MAX_INDEX + 1) *
+						sizeof(uint32_t);
+#endif
 	dev_info->reta_size = pf->hash_lut_size;
 	dev_info->flow_type_rss_offloads = I40E_RSS_OFFLOAD_ALL;
 
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 9f92a2f..486b394 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1641,6 +1641,10 @@ i40evf_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info)
 	dev_info->max_tx_queues = vf->vsi_res->num_queue_pairs;
 	dev_info->min_rx_bufsize = I40E_BUF_SIZE_MIN;
 	dev_info->max_rx_pktlen = I40E_FRAME_SIZE_MAX;
+#ifdef RTE_QUERY_HASH_KEY_SIZE
+	dev_info->hash_key_size = (I40E_VFQF_HKEY_MAX_INDEX + 1) *
+						sizeof(uint32_t);
+#endif
 	dev_info->reta_size = ETH_RSS_RETA_SIZE_64;
 	dev_info->flow_type_rss_offloads = I40E_RSS_OFFLOAD_ALL;
 
-- 
1.9.3

  parent reply	other threads:[~2015-06-04  7:33 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-04  1:00 [dpdk-dev] [PATCH 0/6] query hash key size in byte Helin Zhang
2015-06-04  1:00 ` [dpdk-dev] [PATCH 1/6] ethdev: add an field for querying hash key size Helin Zhang
2015-06-04 13:05   ` Neil Horman
2015-06-05  6:21     ` Zhang, Helin
2015-06-05 10:30       ` Neil Horman
2015-06-04  1:00 ` [dpdk-dev] [PATCH 2/6] e1000: fill the " Helin Zhang
2015-06-04  1:00 ` [dpdk-dev] [PATCH 3/6] fm10k: " Helin Zhang
2015-06-04  1:00 ` [dpdk-dev] [PATCH 4/6] i40e: " Helin Zhang
2015-06-04  1:00 ` [dpdk-dev] [PATCH 5/6] ixgbe: " Helin Zhang
2015-06-04  1:00 ` [dpdk-dev] [PATCH 6/6] app/testpmd: show " Helin Zhang
2015-06-04  7:33 ` [dpdk-dev] [PATCH v2 0/6] query hash key size in byte Helin Zhang
2015-06-04  7:33   ` [dpdk-dev] [PATCH v2 1/6] ethdev: add an field for querying hash key size Helin Zhang
2015-06-04 10:38     ` Ananyev, Konstantin
2015-06-12  6:06       ` Zhang, Helin
2015-06-04  7:33   ` [dpdk-dev] [PATCH v2 2/6] e1000: fill the " Helin Zhang
2015-06-04  7:33   ` [dpdk-dev] [PATCH v2 3/6] fm10k: " Helin Zhang
2015-06-04  7:33   ` Helin Zhang [this message]
2015-06-04  7:33   ` [dpdk-dev] [PATCH v2 5/6] ixgbe: " Helin Zhang
2015-06-04  7:33   ` [dpdk-dev] [PATCH v2 6/6] app/testpmd: show " Helin Zhang
2015-06-12  7:33   ` [dpdk-dev] [PATCH v3 0/6] query hash key size in byte Helin Zhang
2015-06-12  7:33     ` [dpdk-dev] [PATCH v3 1/6] ethdev: add an field for querying hash key size Helin Zhang
2015-06-15 15:01       ` Thomas Monjalon
2015-06-12  7:33     ` [dpdk-dev] [PATCH v3 2/6] e1000: fill the " Helin Zhang
2015-06-12  7:33     ` [dpdk-dev] [PATCH v3 3/6] fm10k: " Helin Zhang
2015-06-12  7:33     ` [dpdk-dev] [PATCH v3 4/6] i40e: " Helin Zhang
2015-06-12  7:34     ` [dpdk-dev] [PATCH v3 5/6] ixgbe: " Helin Zhang
2015-06-12  7:34     ` [dpdk-dev] [PATCH v3 6/6] app/testpmd: show " Helin Zhang
2015-06-12  9:31     ` [dpdk-dev] [PATCH v3 0/6] query hash key size in byte Ananyev, Konstantin
2015-07-08 23:17       ` Thomas Monjalon

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=1433403216-7114-5-git-send-email-helin.zhang@intel.com \
    --to=helin.zhang@intel.com \
    --cc=dev@dpdk.org \
    /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).