From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0047.outbound.protection.outlook.com [104.47.41.47]) by dpdk.org (Postfix) with ESMTP id F24701B5E7 for ; Tue, 7 Nov 2017 09:35:41 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=MPhLhF0OEdQX5ccuSC9laeUtsmQMB59toIRsYWjm7UI=; b=SGbtbv/+rpa9VbEeJtwI8w5YeO5I8ogdOrDHyHA4EUXuAGD4sThE3LJiDuEWlEZyupbg3gx3EuF5rJQfdGClF4SrE0aZMmGQCGSJBm0ly0Wwdi0pyQwHE8y9kxowhEB9HFpYcqtC964O3o1rKhbrQ4EZo6a2ID0lQjmQBI92YwI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Rasesh.Mody@cavium.com; Received: from cavium.com (198.186.0.2) by CY4PR0701MB3827.namprd07.prod.outlook.com (2603:10b6:910:94::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Tue, 7 Nov 2017 08:35:39 +0000 From: Rasesh Mody To: dev@dpdk.org Cc: Harish Patil , ferruh.yigit@intel.com, Dept-EngDPDKDev@cavium.com Date: Tue, 7 Nov 2017 00:34:19 -0800 Message-Id: <1510043665-8160-3-git-send-email-rasesh.mody@cavium.com> X-Mailer: git-send-email 1.7.10.3 In-Reply-To: <1510043665-8160-1-git-send-email-rasesh.mody@cavium.com> References: <1510043665-8160-1-git-send-email-rasesh.mody@cavium.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [198.186.0.2] X-ClientProxiedBy: YQXPR0101CA0004.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c00:15::17) To CY4PR0701MB3827.namprd07.prod.outlook.com (2603:10b6:910:94::33) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 491e9d34-5625-43f7-2fde-08d525ba8760 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603199); SRVR:CY4PR0701MB3827; X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3827; 3:h8a9UFd35tZGFmukqNhVeBIf7r6AJF4uVpY6hIKba16P/hsr+20a79NgXPdL07UwqEynDOGwmiiGOgLx4GccWUcwofYRH+Lob0vBtqvxHPbA+yOqMld+8+SRU3+EjUwm+gBQPctaDIvASLybtzi9Dp908tnkD9JvSq95DUHLw11C2bUvq2Vhv3GEeLwDlL/QN7yoQbWZpu5jxSUF23IqGouj2oGFfzKE0ElORAMeBIZdHjcV0bKFqQ1NwU+Ge/xY; 25:wmEKQE+TrmXn4VTrkT96zpDC9OSecajS4TgjrMWD25jvPJ/B23MgYdzNUlVPV7qwLEEkizAaHW2FWcHB+EMP6P/NXliD4uJgoQghcfDJTSVtEwpHAZRjg0/0CQr8fsHQSA4YWmK0YSBcphVljD1dbZVi5VFrQotnP+wyE7dGmCyVHzxO1x6RsM2C9mkWrtnOjIYiq/O63Bp7uINx3Af6bmpxrmmHTCKCqN1IMMpoO52bbx5+5ox6YVgBxxp9il046p4R0JEyJMQZLBiwU4+ZI9BADeKB1A79ChQAGG0RF+/OHGr4ahqeALte+0Lt4+wv5sZ0mPXsshzjdqHIK9gUOw==; 31:XO1zIytb2sDGjboaUMTUxIklag48f0g0c0vAil7T1jEv4vNraczB/HvE6WUp3MG2jjpoMN3EKjHKwqgAcSUyCxb4R6ykwOYj4qghGGAHqOJUCkV5vsumkVrNhWHmieLCtbmZelqMSULwBxyFI+db6TJ/bnJmCvH+NLpPI3PQ5EzcajnyW4KfTUzPgvAgNo+b2Lhn+FfxCn4ZQOw+vjL6zmUcOKd2Mt6VRjtJsFe7IGs= X-MS-TrafficTypeDiagnostic: CY4PR0701MB3827: X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3827; 20:A/7FjF1g6UFe1SLCVOVvR2pMmZSKrjTNAzfxY5Nmz/1ftMsqCh9L+Cv2aTRXhcMIwBD6b/XluNtP7c/QRO6aOMJT6qq+s1DMbZLmxlloZhn442L7jhTsyfa09+FjO4PcDLQ5SYZFXmhtMC3k/j0C6DoyK4eQJmLpcw7373TDpXHzl0jbhvnn5tLQM2oglzEzopaEbEhclBukWm5OEbG+RUHRp/Oyh2qf+gSWuYc2ng0fp842WoPbCXS8FtVe2muclPjAuEdHRJlRIOFdqBsap4cpgcglXv6IxN32h0KXbCvlHfyfHI9qtuoSqabsX604a9LOUVVBctuTbAAH87XyTde03EvOwZVqc1SLfJQSdCDN1mQlxdLgTiSFZXLmI3dvUiaEj43ithhyXn2zcHAN5rVeDZbBxK00Ig58B7i0lwMIghMUeMlTC+bUjSMWGtBgKZepV/O8rdX/yiR3IRsJa2L5wVxEWImWfR8UHhiYOjIYgq7sprc6Of5+AL6Rptne; 4:VwTiZb8Cl5HqIAytiZxVG2df4tqWvj+0+qshACetPBRijUWhEMIPxI+MaqaBFm2T84popEcmYNJWw8BQeeIdD6Kr1SKzJbH4nUx0LVoqxOlJJ7GV5NRbOVgVKJYOmpAepR719yDDMz5c2NKuYvORO9HUvJsAw1ZVYxYiU2rtxk7yt6TPAGtp9SyWFTaDTxNGNiktbyPvpy1MQekrNEN3zT5F7srNhCTcHmKj3azN4SFBAssnLazRy2HWOQAMMQAOkg+J11biwKhnbobfIqLbIw== X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(100000703101)(100105400095)(3231021)(6041248)(20161123562025)(20161123564025)(20161123558100)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR0701MB3827; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR0701MB3827; X-Forefront-PRVS: 0484063412 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(189002)(199003)(2351001)(47776003)(50226002)(6916009)(36756003)(76176999)(53936002)(8936002)(68736007)(55016002)(2950100002)(4326008)(48376002)(50466002)(50986999)(5003940100001)(66066001)(97736004)(8676002)(86362001)(316002)(16586007)(81156014)(81166006)(2361001)(478600001)(33646002)(72206003)(6666003)(305945005)(21086003)(106356001)(7736002)(69596002)(107886003)(189998001)(4720700003)(25786009)(2906002)(5660300001)(6116002)(105586002)(16526018)(3846002)(101416001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR0701MB3827; H:cavium.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY4PR0701MB3827; 23:lqPaFPaTK3T3lc64jo26n/ONnRsThVFf0LLyXlD?= =?us-ascii?Q?DTXMLxQKRqJavHGtZFbTcvV4f+MTH2a2TFgXqhzWTyeW3qzygZ37GumdbtDc?= =?us-ascii?Q?+VON/OBQucQJoBRXfLbZfS7K7jCeRsdXYZ17stM13F1uM+6ilnk0qocDy9zk?= =?us-ascii?Q?ppApZH2V0x8F71UicRnBesIF7U+K7nArQKpc223JTzdVLUYHi3rbHyBhI2wK?= =?us-ascii?Q?9tihtY1LtGEA/IXdxuJvYIJ8DV1oUqOBrgGVhLoPMJ2kcOCy67hPl+3D/3uk?= =?us-ascii?Q?lv8iu5ssV4gdCBNqEHktAtxfglbzHUk4W4QgQ8iT6g3DXtFs85A2zmASIxmz?= =?us-ascii?Q?s4XOrKzGniF+mwxhTIkVTEyWunR6dMatL1cdB6SRRIJg1pnGiPAqI3zukBC+?= =?us-ascii?Q?uAPwncfhZVQilrCEaP04VZYW5s4HktsfsGoUYbHcRkK/VQRV0GzzvxDoPn2g?= =?us-ascii?Q?mJwyIZQfJXNQe2Ps/sxqo2HAIYKDMPiE++fBQZGW8GlELbuW7nGx2SslWLbj?= =?us-ascii?Q?JkfDloxCLxJGjKNKfv+tithlrw5CkJt8Qil9SnwrPi5TJPRjlcfUCybxVcOn?= =?us-ascii?Q?avrEvVHwC1rMg7qdTNIG6dA0MXHQJone1MoefArz79RwfvHZTUjoDqoO5qtW?= =?us-ascii?Q?JRenffmvisqn/EOH6VdM1XeE7tuuF4wz1mZBDJbc5XJc8hc+V3/VxKCM3b5G?= =?us-ascii?Q?zkj8Td6bklcjV20zq2H6FefQKoWudvONnSD3+f+l/s8bfjOvPUHsstmoZKFD?= =?us-ascii?Q?PXmL1zEbfBD0+66jCUeKSVtTBTe1/JY5CdcGYeUn0jJWWgeRv9edCzIVxl+F?= =?us-ascii?Q?reHCIqXrxj5ddhqKedklnuMoCeKmMrSuBgfXFVbqqV2WpF2ulKXZ3gj6a8Et?= =?us-ascii?Q?TMA22mOgFmuml1Ej9kxuRSuY6ErX0Pr5/DRQ8iq4+XPEjHMTwPDSHLpxw+3D?= =?us-ascii?Q?ua7fOEdxbdrl9jyX37/csTUzXb6ApjTjYnGCumGZIHPx7180NQ1zX5U0HmNj?= =?us-ascii?Q?4KNYMHryg5hTsCvoxAzAO8xTlVbw73RnFFpteVxBQNntIF5Lbsq+b2iRRJGC?= =?us-ascii?Q?TroQ4aL3nDH/a15FR7huc7DbyB52GENp60t9YDw37OaVe67c4gAJ4Uurkp/u?= =?us-ascii?Q?DwMPX53OCcbaCEigwZmjJeplVnqowPS+ksdQAQPMZgIUTSzMFJm2kWciW0le?= =?us-ascii?Q?dyUzvg7OizEmJn5w=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3827; 6:rF4Vv26mBEXKQRMzVkgojjDROLiF0CLtoyTHUROCiK7Y6DAJ7d2MqdhU5o2Eq+xyI8+oSyry8cu3e+xDeVr3rK8YV1VaS+syZb69+xQupezD+IY15uW64hmwkLbNnZcIXmAhu9B6/iZtG6JwR/5qo1LLMmaiBqVh7KSPKBdWUf2PbVegs37Yhn6cVlzK/pZUNScmXJKTPnpRVNB74V0FiGgy5xGbAHwTJUx/OsqkWhWhDaINWfDmxrd2cYyxoSjvDgmv11uxCJqPUVrJQxNpwH6+d5sLmPhyQOz2+EwC5QQd9IqY5VbcZDluYK0JiICjAPhfGW9yKnm0MdQfqxfXC/MEZsT63O0l54p5eEX+LT4=; 5:2aPFXY35TQmlwsfTcsiDvpT6/Orx2C0CNzmJWQTdqGrMy6wET4RpeW3XnihZwgNRdTM7ViCb/5u2BuKyO9EAc9prvFfOXAOs88mdlrnJ39BWq3/7d8FCX8HBICzMeoXpxSCysZk00aanDB19Sw2XkMRRD0JrsX46Qw4d8VxFjSY=; 24:bUKNimx/gtx0zDCZdqjuGbpeQCB1wqWwFE/x3L8340NhZp/+DkfE+6VzHLPff3NL3+oVmmbckzr85j6Rirb6kzVG2+XhjsSzk+3qxsAkc6E=; 7:T06pJGytvZuSyPNWszJMdWK/1LSRSFiX5CSZ+R5aNXQK9HGB3YVlgJ/pVdbMl3w4lhPXRpbKgdKePa7ScweOaJ8OdDhASp2wlSDa5u64CTNdnqkqiEweL9OQmY0cf9TkLq3kDWCPYwyw+9yA/z5ZqjgaDzFr+kpv7ZdS7tocS6gAOXY14OpK/c3n3hXIdjzb52fMqsTulOJQlhLV3418kKx7pLgUkgFnp8NOr1iCAVCarLT1FA9CkOFf4jq9h0Ii SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Nov 2017 08:35:39.9571 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 491e9d34-5625-43f7-2fde-08d525ba8760 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR0701MB3827 Subject: [dpdk-dev] [PATCH 2/8] net/qede: fix vxlan filter deletion X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Nov 2017 08:35:42 -0000 From: Harish Patil 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 --- 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