From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH v2 03/23] mlx4: make sure experimental device query function is implemented
Date: Tue, 30 Jun 2015 11:27:49 +0200 [thread overview]
Message-ID: <1435656489-27986-4-git-send-email-adrien.mazarguil@6wind.com> (raw)
In-Reply-To: <1435656489-27986-1-git-send-email-adrien.mazarguil@6wind.com>
From: Olga Shern <olgas@mellanox.com>
HAVE_EXP_QUERY_DEVICE is used to check whether ibv_exp_query_device() can be
used. RSS and inline receive features depend on it.
Signed-off-by: Olga Shern <olgas@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
---
drivers/net/mlx4/Makefile | 4 ++++
drivers/net/mlx4/mlx4.c | 17 ++++++++++-------
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile
index 97b364a..ce1f2b0 100644
--- a/drivers/net/mlx4/Makefile
+++ b/drivers/net/mlx4/Makefile
@@ -112,6 +112,10 @@ mlx4_autoconf.h: $(RTE_SDK)/scripts/auto-config-h.sh
SEND_RAW_WR_SUPPORT \
infiniband/verbs.h \
type 'struct ibv_send_wr_raw' $(AUTOCONF_OUTPUT)
+ $Q sh -- '$<' '$@' \
+ HAVE_EXP_QUERY_DEVICE \
+ infiniband/verbs.h \
+ type 'struct ibv_exp_device_attr' $(AUTOCONF_OUTPUT)
mlx4.o: mlx4_autoconf.h
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index ad37e01..bd20569 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -4458,17 +4458,18 @@ mlx4_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
struct ibv_pd *pd = NULL;
struct priv *priv = NULL;
struct rte_eth_dev *eth_dev;
-#if defined(INLINE_RECV) || defined(RSS_SUPPORT)
+#ifdef HAVE_EXP_QUERY_DEVICE
struct ibv_exp_device_attr exp_device_attr;
-#endif
+#endif /* HAVE_EXP_QUERY_DEVICE */
struct ether_addr mac;
union ibv_gid temp_gid;
+#ifdef HAVE_EXP_QUERY_DEVICE
+ exp_device_attr.comp_mask = IBV_EXP_DEVICE_ATTR_EXP_CAP_FLAGS;
#ifdef RSS_SUPPORT
- exp_device_attr.comp_mask =
- (IBV_EXP_DEVICE_ATTR_EXP_CAP_FLAGS |
- IBV_EXP_DEVICE_ATTR_RSS_TBL_SZ);
+ exp_device_attr.comp_mask |= IBV_EXP_DEVICE_ATTR_RSS_TBL_SZ;
#endif /* RSS_SUPPORT */
+#endif /* HAVE_EXP_QUERY_DEVICE */
DEBUG("using port %u (%08" PRIx32 ")", port, test);
@@ -4513,11 +4514,12 @@ mlx4_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
priv->port = port;
priv->pd = pd;
priv->mtu = ETHER_MTU;
-#ifdef RSS_SUPPORT
+#ifdef HAVE_EXP_QUERY_DEVICE
if (ibv_exp_query_device(ctx, &exp_device_attr)) {
- INFO("experimental ibv_exp_query_device");
+ ERROR("ibv_exp_query_device() failed");
goto port_error;
}
+#ifdef RSS_SUPPORT
if ((exp_device_attr.exp_device_cap_flags &
IBV_EXP_DEVICE_QPG) &&
(exp_device_attr.exp_device_cap_flags &
@@ -4569,6 +4571,7 @@ mlx4_pci_devinit(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev)
priv->inl_recv_size);
}
#endif /* INLINE_RECV */
+#endif /* HAVE_EXP_QUERY_DEVICE */
(void)mlx4_getenv_int;
priv->vf = vf;
--
2.1.0
next prev parent reply other threads:[~2015-06-30 9:28 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-05 23:15 [dpdk-dev] [PATCH 00/16] mlx4: MOFED 3.0 support, bugfixes and enhancements Adrien Mazarguil
2015-06-05 23:15 ` [dpdk-dev] [PATCH 01/16] mlx4: add MOFED 3.0 compatibility to interfaces names retrieval Adrien Mazarguil
2015-06-05 23:15 ` [dpdk-dev] [PATCH 02/16] mlx4: use experimental verbs for polling and completions Adrien Mazarguil
2015-06-05 23:15 ` [dpdk-dev] [PATCH 03/16] mlx4: make sure experimental device query function is implemented Adrien Mazarguil
2015-06-05 23:15 ` [dpdk-dev] [PATCH 04/16] mlx4: add L3 and L4 RX checksum offload support Adrien Mazarguil
2015-06-05 23:15 ` [dpdk-dev] [PATCH 05/16] mlx4: add L2 tunnel (VXLAN) " Adrien Mazarguil
2015-06-05 23:15 ` [dpdk-dev] [PATCH 06/16] mlx4: use faster CQ polling function Adrien Mazarguil
2015-06-05 23:15 ` [dpdk-dev] [PATCH 07/16] mlx4: update optimized steering warning message Adrien Mazarguil
2015-06-05 23:15 ` [dpdk-dev] [PATCH 08/16] mlx4: avoid looking up WR ID to improve RX performance Adrien Mazarguil
2015-06-05 23:15 ` [dpdk-dev] [PATCH 09/16] mlx4: merge RX queue setup functions Adrien Mazarguil
2015-06-05 23:15 ` [dpdk-dev] [PATCH 10/16] mlx4: allow applications to use fork() safely Adrien Mazarguil
2015-06-05 23:15 ` [dpdk-dev] [PATCH 11/16] mlx4: improve accuracy of link status information Adrien Mazarguil
2015-06-05 23:15 ` [dpdk-dev] [PATCH 12/16] mlx4: add support for upstream flow steering API Adrien Mazarguil
2015-06-05 23:15 ` [dpdk-dev] [PATCH 13/16] mlx4: fix error message for invalid number of descriptors Adrien Mazarguil
2015-06-05 23:15 ` [dpdk-dev] [PATCH 14/16] mlx4: remove provision for flow creation failure in DMFS A0 mode Adrien Mazarguil
2015-06-05 23:15 ` [dpdk-dev] [PATCH 15/16] mlx4: fix support for multiple VLAN filters Adrien Mazarguil
2015-06-05 23:15 ` [dpdk-dev] [PATCH 16/16] mlx4: query netdevice to get initial MAC address Adrien Mazarguil
2015-06-30 9:27 ` [dpdk-dev] [PATCH v2 00/23] mlx4: MOFED 3.0 support, bugfixes and enhancements Adrien Mazarguil
2015-06-30 9:27 ` [dpdk-dev] [PATCH v2 01/23] mlx4: fix possible crash on scattered mbuf allocation failure Adrien Mazarguil
2015-06-30 9:27 ` [dpdk-dev] [PATCH v2 02/23] mlx4: add MOFED 3.0 compatibility to interfaces names retrieval Adrien Mazarguil
2015-06-30 9:27 ` Adrien Mazarguil [this message]
2015-06-30 9:27 ` [dpdk-dev] [PATCH v2 04/23] mlx4: avoid looking up WR ID to improve RX performance Adrien Mazarguil
2015-06-30 9:27 ` [dpdk-dev] [PATCH v2 05/23] mlx4: merge RX queue setup functions Adrien Mazarguil
2015-06-30 9:27 ` [dpdk-dev] [PATCH v2 06/23] mlx4: allow applications to partially use fork() Adrien Mazarguil
2015-06-30 9:27 ` [dpdk-dev] [PATCH v2 07/23] mlx4: improve accuracy of link status information Adrien Mazarguil
2015-06-30 9:27 ` [dpdk-dev] [PATCH v2 08/23] mlx4: use MOFED 3.0 extended flow steering API Adrien Mazarguil
2015-06-30 9:27 ` [dpdk-dev] [PATCH v2 09/23] mlx4: fix error message for invalid number of descriptors Adrien Mazarguil
2015-06-30 9:27 ` [dpdk-dev] [PATCH v2 10/23] mlx4: remove provision for flow creation failure in DMFS A0 mode Adrien Mazarguil
2015-06-30 9:27 ` [dpdk-dev] [PATCH v2 11/23] mlx4: fix support for multiple VLAN filters Adrien Mazarguil
2015-06-30 9:27 ` [dpdk-dev] [PATCH v2 12/23] mlx4: query netdevice to get initial MAC address Adrien Mazarguil
2015-06-30 9:27 ` [dpdk-dev] [PATCH v2 13/23] mlx4: use MOFED 3.0 fast verbs interface for RX operations Adrien Mazarguil
2015-06-30 9:28 ` [dpdk-dev] [PATCH v2 14/23] mlx4: improve performance by requesting TX completion events less often Adrien Mazarguil
2015-06-30 9:28 ` [dpdk-dev] [PATCH v2 15/23] mlx4: use MOFED 3.0 fast verbs interface for TX operations Adrien Mazarguil
2015-06-30 9:28 ` [dpdk-dev] [PATCH v2 16/23] mlx4: move scattered TX processing to helper function Adrien Mazarguil
2015-06-30 9:28 ` [dpdk-dev] [PATCH v2 17/23] mlx4: shrink TX queue elements for better performance Adrien Mazarguil
2015-06-30 9:28 ` [dpdk-dev] [PATCH v2 18/23] mlx4: prefetch completed TX mbufs before releasing them Adrien Mazarguil
2015-06-30 9:28 ` [dpdk-dev] [PATCH v2 19/23] mlx4: add L3 and L4 checksum offload support Adrien Mazarguil
2015-06-30 9:28 ` [dpdk-dev] [PATCH v2 20/23] mlx4: add L2 tunnel (VXLAN) " Adrien Mazarguil
2015-06-30 9:28 ` [dpdk-dev] [PATCH v2 21/23] mlx4: associate resource domain with CQs and QPs to enhance performance Adrien Mazarguil
2015-06-30 9:28 ` [dpdk-dev] [PATCH v2 22/23] mlx4: disable multicast echo when device is not VF Adrien Mazarguil
2015-06-30 9:28 ` [dpdk-dev] [PATCH v2 23/23] doc: update mlx4 documentation following MOFED 3.0 changes Adrien Mazarguil
2015-07-01 9:33 ` [dpdk-dev] [PATCH v2 00/23] mlx4: MOFED 3.0 support, bugfixes and enhancements 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=1435656489-27986-4-git-send-email-adrien.mazarguil@6wind.com \
--to=adrien.mazarguil@6wind.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).