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
Subject: [dpdk-dev] [PATCH 2/8] net/qede: fix vxlan filter deletion
Date: Tue, 7 Nov 2017 00:34:19 -0800 [thread overview]
Message-ID: <1510043665-8160-3-git-send-email-rasesh.mody@cavium.com> (raw)
In-Reply-To: <1510043665-8160-1-git-send-email-rasesh.mody@cavium.com>
From: Harish Patil <harish.patil@cavium.com>
Initialize ucast parameters before checking if filters exists.
Fixes: e0947ed912f7 ("net/qede: add support for VXLAN UDP port config over VF")
Signed-off-by: Harish Patil <harish.patil@cavium.com>
---
drivers/net/qede/qede_ethdev.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index c228b06..43562bc 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -2424,6 +2424,23 @@ static int qede_vxlan_tunn_config(struct rte_eth_dev *eth_dev,
return qede_vxlan_enable(eth_dev,
ECORE_TUNN_CLSS_MAC_VLAN, false, true);
+ filter_type = conf->filter_type;
+ /* Determine if the given filter classification is supported */
+ qede_get_ecore_tunn_params(filter_type, &type, &clss, str);
+ if (clss == MAX_ECORE_TUNN_CLSS) {
+ DP_ERR(edev, "Unsupported filter type\n");
+ return -EINVAL;
+ }
+ /* Init tunnel ucast params */
+ rc = qede_set_ucast_tunn_cmn_param(&ucast, conf, type);
+ if (rc != ECORE_SUCCESS) {
+ DP_ERR(edev, "Unsupported VxLAN filter type 0x%x\n",
+ conf->filter_type);
+ return rc;
+ }
+ DP_INFO(edev, "Rule: \"%s\", op %d, type 0x%x\n",
+ str, filter_op, ucast.type);
+
ucast.opcode = ECORE_FILTER_REMOVE;
if (!(filter_type & ETH_TUNNEL_FILTER_TENID)) {
@@ -2437,6 +2454,8 @@ static int qede_vxlan_tunn_config(struct rte_eth_dev *eth_dev,
if (rc != ECORE_SUCCESS)
return rc;
+ qdev->vxlan.num_filters--;
+
/* Disable VXLAN if VXLAN filters become 0 */
if (qdev->vxlan.num_filters == 0)
return qede_vxlan_enable(eth_dev, clss, false, true);
--
1.7.10.3
next prev parent reply other threads:[~2017-11-07 8:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-07 8:34 [dpdk-dev] [PATCH 0/8] net/qede: coverity issue fixes and bug fixes Rasesh Mody
2017-11-07 8:34 ` [dpdk-dev] [PATCH 1/8] net/qede: fix to disable per-VF Tx switching feature Rasesh Mody
2017-11-08 0:53 ` Thomas Monjalon
2017-11-08 1:34 ` Patil, Harish
2017-11-08 1:44 ` Thomas Monjalon
2017-11-08 2:34 ` Patil, Harish
2017-11-07 8:34 ` Rasesh Mody [this message]
2017-11-07 8:34 ` [dpdk-dev] [PATCH 3/8] net/qede: fix to update device link structure Rasesh Mody
2017-11-07 8:34 ` [dpdk-dev] [PATCH 4/8] net/qede: remove duplicate includes Rasesh Mody
2017-11-07 8:34 ` [dpdk-dev] [PATCH 5/8] net/qede: fix to release the acquired ptt Rasesh Mody
2017-11-07 8:34 ` [dpdk-dev] [PATCH 6/8] net/qede/base: fix to initialize filter API return code Rasesh Mody
2017-11-07 8:34 ` [dpdk-dev] [PATCH 7/8] net/qede/base: fix division by zero Rasesh Mody
2017-11-07 8:34 ` [dpdk-dev] [PATCH 8/8] net/qede: fix null pointer dereferences Rasesh Mody
2017-11-07 22:53 ` [dpdk-dev] [PATCH 0/8] net/qede: coverity issue fixes and bug fixes 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=1510043665-8160-3-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 \
/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).