From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
To: Adrien Mazarguil <adrien.mazarguil@6wind.com>,
Yongseok Koh <yskoh@mellanox.com>
Cc: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 1/5] net/mlx5: add VF information in configuration
Date: Tue, 13 Mar 2018 13:50:35 +0100 [thread overview]
Message-ID: <753252b906fbabad7095a1b2e18e035a59f51594.1520944256.git.nelio.laranjeiro@6wind.com> (raw)
In-Reply-To: <cover.1520944256.git.nelio.laranjeiro@6wind.com>
In-Reply-To: <cover.1520944256.git.nelio.laranjeiro@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5.c | 10 ++++++++++
drivers/net/mlx5/mlx5.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 95dd49420..d5cc85d19 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -597,6 +597,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
int err = 0;
struct ibv_context *attr_ctx = NULL;
struct ibv_device_attr_ex device_attr;
+ unsigned int vf;
unsigned int mps;
unsigned int cqe_comp;
unsigned int tunnel_en = 0;
@@ -646,6 +647,14 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
continue;
DRV_LOG(INFO, "PCI information matches, using device \"%s\"",
list[i]->name);
+ vf = ((pci_dev->id.device_id ==
+ PCI_DEVICE_ID_MELLANOX_CONNECTX4VF) ||
+ (pci_dev->id.device_id ==
+ PCI_DEVICE_ID_MELLANOX_CONNECTX4LXVF) ||
+ (pci_dev->id.device_id ==
+ PCI_DEVICE_ID_MELLANOX_CONNECTX5VF) ||
+ (pci_dev->id.device_id ==
+ PCI_DEVICE_ID_MELLANOX_CONNECTX5EXVF));
attr_ctx = mlx5_glue->open_device(list[i]);
rte_errno = errno;
err = rte_errno;
@@ -871,6 +880,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
DRV_LOG(DEBUG,
"hardware Rx end alignment padding is %ssupported",
(config.hw_padding ? "" : "not "));
+ config.vf = vf;
config.tso = ((device_attr_ex.tso_caps.max_tso > 0) &&
(device_attr_ex.tso_caps.supported_qpts &
(1 << IBV_QPT_RAW_PACKET)));
diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h
index faacfd9d6..9191b2949 100644
--- a/drivers/net/mlx5/mlx5.h
+++ b/drivers/net/mlx5/mlx5.h
@@ -78,6 +78,7 @@ struct mlx5_dev_config {
unsigned int hw_vlan_strip:1; /* VLAN stripping is supported. */
unsigned int hw_fcs_strip:1; /* FCS stripping is supported. */
unsigned int hw_padding:1; /* End alignment padding is supported. */
+ unsigned int vf:1; /* This is a VF. */
unsigned int mps:2; /* Multi-packet send supported mode. */
unsigned int tunnel_en:1;
/* Whether tunnel stateless offloads are supported. */
--
2.11.0
next prev parent reply other threads:[~2018-03-13 12:51 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-13 12:50 [dpdk-dev] [PATCH 0/5] net/mlx5: use Netlink in VF mode Nelio Laranjeiro
2018-03-13 12:50 ` Nelio Laranjeiro [this message]
2018-03-14 17:10 ` [dpdk-dev] [PATCH 1/5] net/mlx5: add VF information in configuration Adrien Mazarguil
2018-03-13 12:50 ` [dpdk-dev] [PATCH 2/5] net/mlx5: retrieve device index from Netlink Nelio Laranjeiro
2018-03-14 17:10 ` Adrien Mazarguil
2018-03-13 12:50 ` [dpdk-dev] [PATCH 3/5] net/mlx5: use Netlink to add/remove MAC addresses Nelio Laranjeiro
2018-03-14 17:10 ` Adrien Mazarguil
2018-03-13 12:50 ` [dpdk-dev] [PATCH 4/5] net/mlx5: use Netlink to enable promisc/allmulti Nelio Laranjeiro
2018-03-14 17:11 ` Adrien Mazarguil
2018-03-13 12:50 ` [dpdk-dev] [PATCH 5/5] net/mlx5: add a parameter for Netlink support in VF Nelio Laranjeiro
2018-03-14 17:11 ` Adrien Mazarguil
2018-03-19 15:20 ` [dpdk-dev] [PATCH v2 0/3] net/mlx5: use Netlink in VF mode Nelio Laranjeiro
2018-03-19 15:20 ` [dpdk-dev] [PATCH v2 1/3] net/mlx5: use Netlink to add/remove MAC addresses Nelio Laranjeiro
2018-03-19 15:20 ` [dpdk-dev] [PATCH v2 2/3] net/mlx5: use Netlink to enable promisc / all multicast mode Nelio Laranjeiro
2018-03-19 15:20 ` [dpdk-dev] [PATCH v2 3/3] net/mlx5: add a parameter for Netlink support in VF Nelio Laranjeiro
2018-03-21 13:40 ` [dpdk-dev] [PATCH v3 0/3] net/mlx5: use Netlink in VF mode Nelio Laranjeiro
2018-04-05 15:07 ` [dpdk-dev] [PATCH v4 " Nelio Laranjeiro
2018-04-08 8:16 ` Shahaf Shuler
2018-04-05 15:07 ` [dpdk-dev] [PATCH v4 1/3] net/mlx5: use Netlink to add/remove MAC addresses Nelio Laranjeiro
2018-04-05 15:07 ` [dpdk-dev] [PATCH v4 2/3] net/mlx5: use Netlink to enable promisc / allmulti mode Nelio Laranjeiro
2018-04-05 15:07 ` [dpdk-dev] [PATCH v4 3/3] net/mlx5: add a parameter for Netlink support in VF Nelio Laranjeiro
2018-03-21 13:40 ` [dpdk-dev] [PATCH v3 1/3] net/mlx5: use Netlink to add/remove MAC addresses Nelio Laranjeiro
2018-03-22 7:34 ` Shahaf Shuler
2018-03-22 9:04 ` Nélio Laranjeiro
2018-03-22 9:45 ` Shahaf Shuler
2018-03-22 10:28 ` Nélio Laranjeiro
2018-03-28 5:56 ` Shahaf Shuler
2018-03-22 7:44 ` Shahaf Shuler
2018-03-21 13:40 ` [dpdk-dev] [PATCH v3 2/3] net/mlx5: use Netlink to enable promisc / all multicast mode Nelio Laranjeiro
2018-03-22 7:36 ` Shahaf Shuler
2018-03-21 13:40 ` [dpdk-dev] [PATCH v3 3/3] net/mlx5: add a parameter for Netlink support in VF Nelio Laranjeiro
2018-03-22 7:38 ` Shahaf Shuler
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=753252b906fbabad7095a1b2e18e035a59f51594.1520944256.git.nelio.laranjeiro@6wind.com \
--to=nelio.laranjeiro@6wind.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=yskoh@mellanox.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).