DPDK patches and discussions
 help / color / mirror / Atom feed
From: Rasesh Mody <rasesh.mody@cavium.com>
To: dev@dpdk.org
Cc: Harish Patil <harish.patil@cavium.com>,
	ferruh.yigit@intel.com, Dept-EngDPDKDev@cavium.com,
	stable@dpdk.org
Subject: [dpdk-dev] [PATCH] net/qede: fix tunnel init params
Date: Wed,  7 Feb 2018 13:51:01 -0800	[thread overview]
Message-ID: <1518040261-20273-1-git-send-email-rasesh.mody@cavium.com> (raw)

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

Add the missing VF check to initialize tunnel params correctly.

Fixes: dd28bc8c6ef4 ("net/qede: fix VF port creation sequence")
Cc: stable@dpdk.org

Signed-off-by: Harish Patil <harish.patil@cavium.com>
---
 drivers/net/qede/qede_ethdev.c |   24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 46e0e36..a91f436 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -3123,16 +3123,22 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 	adapter->vport_started = false;
 
 	/* VF tunnel offloads is enabled by default in PF driver */
-	adapter->vxlan.enable = true;
 	adapter->vxlan.num_filters = 0;
-	adapter->vxlan.filter_type = ETH_TUNNEL_FILTER_IMAC |
-				     ETH_TUNNEL_FILTER_IVLAN;
-	adapter->vxlan.udp_port = QEDE_VXLAN_DEF_PORT;
-	adapter->geneve.enable = true;
-	adapter->vxlan.num_filters = 0;
-	adapter->vxlan.filter_type = ETH_TUNNEL_FILTER_IMAC |
-				     ETH_TUNNEL_FILTER_IVLAN;
-	adapter->vxlan.udp_port = QEDE_GENEVE_DEF_PORT;
+	adapter->geneve.num_filters = 0;
+	if (is_vf) {
+		adapter->vxlan.enable = true;
+		adapter->vxlan.filter_type = ETH_TUNNEL_FILTER_IMAC |
+					     ETH_TUNNEL_FILTER_IVLAN;
+		adapter->vxlan.udp_port = QEDE_VXLAN_DEF_PORT;
+		adapter->geneve.enable = true;
+
+		adapter->geneve.filter_type = ETH_TUNNEL_FILTER_IMAC |
+					      ETH_TUNNEL_FILTER_IVLAN;
+		adapter->geneve.udp_port = QEDE_GENEVE_DEF_PORT;
+	} else {
+		adapter->vxlan.enable = false;
+		adapter->geneve.enable = false;
+	}
 
 	DP_INFO(edev, "MAC address : %02x:%02x:%02x:%02x:%02x:%02x\n",
 		adapter->primary_mac.addr_bytes[0],
-- 
1.7.10.3

             reply	other threads:[~2018-02-07 21:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-07 21:51 Rasesh Mody [this message]
2018-02-08 14:48 ` Ferruh Yigit

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=1518040261-20273-1-git-send-email-rasesh.mody@cavium.com \
    --to=rasesh.mody@cavium.com \
    --cc=Dept-EngDPDKDev@cavium.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=harish.patil@cavium.com \
    --cc=stable@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).