DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rasesh Mody <rasesh.mody@qlogic.com>
To: <thomas.monjalon@6wind.com>
Cc: dev@dpdk.org, sony.chacko@qlogic.com
Subject: [dpdk-dev] [PATCH v2 01/11] bnx2x: Update VF to support newer PF drivers
Date: Mon, 9 Nov 2015 15:56:16 -0800	[thread overview]
Message-ID: <1447113386-19346-2-git-send-email-rasesh.mody@qlogic.com> (raw)
In-Reply-To: <1447113386-19346-1-git-send-email-rasesh.mody@qlogic.com>

From: Harish Patil <harish.patil@qlogic.com>

SR-IOV is supported using bnx2x poll mode driver running as VF driver and
native linux driver running as PF (in host/hypervisor). There is no issue
while running with the PF driver which is at the base version as that of
PMD. However, there is a compatibility issue between newer out-of-box PF
drivers with older VF driver. So the newer VFs would also need to send
BNX2X_VF_TLV_PHYS_PORT_ID (among other TLVs) to differentiate between
newer and older VFs.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
---
 drivers/net/bnx2x/bnx2x_vfpf.c |   11 +++++++++--
 drivers/net/bnx2x/bnx2x_vfpf.h |   15 +++++++++++++++
 2 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnx2x/bnx2x_vfpf.c b/drivers/net/bnx2x/bnx2x_vfpf.c
index 661f0a5..39fd59a 100644
--- a/drivers/net/bnx2x/bnx2x_vfpf.c
+++ b/drivers/net/bnx2x/bnx2x_vfpf.c
@@ -257,8 +257,15 @@ int bnx2x_vf_get_resources(struct bnx2x_softc *sc, uint8_t tx_count, uint8_t rx_
 
 	acq->bulletin_addr = sc->pf2vf_bulletin_mapping.paddr;
 
-	BNX2X_TLV_APPEND(acq, acq->first_tlv.length, BNX2X_VF_TLV_LIST_END,
-			sizeof(struct channel_list_end_tlv));
+	/* Request physical port identifier */
+	BNX2X_TLV_APPEND(acq, acq->first_tlv.length,
+			 BNX2X_VF_TLV_PHYS_PORT_ID,
+			 sizeof(struct channel_tlv));
+
+	BNX2X_TLV_APPEND(acq,
+			 (acq->first_tlv.length + sizeof(struct channel_tlv)),
+			 BNX2X_VF_TLV_LIST_END,
+			 sizeof(struct channel_list_end_tlv));
 
 	/* requesting the resources in loop */
 	obtain_status = bnx2x_loop_obtain_resources(sc);
diff --git a/drivers/net/bnx2x/bnx2x_vfpf.h b/drivers/net/bnx2x/bnx2x_vfpf.h
index 94ce9f0..4f25321 100644
--- a/drivers/net/bnx2x/bnx2x_vfpf.h
+++ b/drivers/net/bnx2x/bnx2x_vfpf.h
@@ -34,12 +34,24 @@ struct vf_resource_query {
 #define	BNX2X_VF_Q_FLAG_DHC             0x0200
 #define	BNX2X_VF_Q_FLAG_LEADING_RSS     0x0400
 
+#define TLV_BUFFER_SIZE			1024
+
+/* general tlv header (used for both vf->pf request and pf->vf response) */
+struct channel_tlv {
+	uint16_t type;
+	uint16_t length;
+};
+
 struct vf_first_tlv {
 	uint16_t type;
 	uint16_t length;
 	uint32_t reply_offset;
 };
 
+struct tlv_buffer_size {
+	uint8_t tlv_buffer[TLV_BUFFER_SIZE];
+};
+
 /* tlv struct for all PF replies except acquire */
 struct vf_common_reply_tlv {
 	uint16_t type;
@@ -244,12 +256,14 @@ union query_tlvs {
 	struct vf_release_tlv		release;
 	struct vf_rss_tlv		update_rss;
 	struct channel_list_end_tlv     list_end;
+	struct tlv_buffer_size		tlv_buf_size;
 };
 
 union resp_tlvs {
 	struct vf_common_reply_tlv	common_reply;
 	struct vf_acquire_resp_tlv	acquire_resp;
 	struct channel_list_end_tlv	list_end;
+	struct tlv_buffer_size		tlv_buf_size;
 };
 
 /* struct allocated by VF driver, PF sends updates to VF via bulletin */
@@ -300,6 +314,7 @@ enum channel_tlvs {
 	BNX2X_VF_TLV_PF_SET_MAC,
 	BNX2X_VF_TLV_PF_SET_VLAN,
 	BNX2X_VF_TLV_UPDATE_RSS,
+	BNX2X_VF_TLV_PHYS_PORT_ID,
 	BNX2X_VF_TLV_MAX
 };
 
-- 
1.7.10.3

  reply	other threads:[~2015-11-09 23:56 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09 23:56 [dpdk-dev] [PATCH v2 00/11] bnx2x: Enhancement, fixes, licensing and doumentation Rasesh Mody
2015-11-09 23:56 ` Rasesh Mody [this message]
2015-11-09 23:56 ` [dpdk-dev] [PATCH v2 02/11] bnx2x: Fix x86_64-native-linuxapp-clang build error Rasesh Mody
2015-11-09 23:56 ` [dpdk-dev] [PATCH v2 03/11] bnx2x: Add periodic debug option Rasesh Mody
2015-11-09 23:56 ` [dpdk-dev] [PATCH v2 04/11] doc: Add BNX2X PMD documentation Rasesh Mody
2015-11-13 16:11   ` Mcnamara, John
2015-11-09 23:56 ` [dpdk-dev] [PATCH v2 05/11] bnx2x: Add LICENSE.bnx2x_pmd and update source files Rasesh Mody
2015-11-09 23:56 ` [dpdk-dev] [PATCH v2 06/11] bnx2x: FreeBSD enablement Rasesh Mody
2015-11-10 10:48   ` Bruce Richardson
2015-11-09 23:56 ` [dpdk-dev] [PATCH v2 07/11] bnx2x: Linux 32bit enablement Rasesh Mody
2015-11-09 23:56 ` [dpdk-dev] [PATCH v2 08/11] bnx2x: Handle zlib compatibility error Rasesh Mody
2015-11-09 23:56 ` [dpdk-dev] [PATCH v2 09/11] maintainers: Add maintainers for BNX2X PMD Rasesh Mody
2015-11-09 23:56 ` [dpdk-dev] [PATCH v2 10/11] config: Enable BNX2X driver build by default Rasesh Mody
2015-11-09 23:56 ` [dpdk-dev] [PATCH v2 11/11] bnx2x: Add BNX2X PMD versioning Rasesh Mody

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=1447113386-19346-2-git-send-email-rasesh.mody@qlogic.com \
    --to=rasesh.mody@qlogic.com \
    --cc=dev@dpdk.org \
    --cc=sony.chacko@qlogic.com \
    --cc=thomas.monjalon@6wind.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).