From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0067.outbound.protection.outlook.com [104.47.40.67]) by dpdk.org (Postfix) with ESMTP id 3829820BD; Wed, 23 May 2018 01:16:18 +0200 (CEST) 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:X-MS-Exchange-SenderADCheck; bh=yYQGei19v4GxSEGWKjVtN66CiTg7m27ILUXqw+YeML8=; b=YgRJPOgBdyRbe/jCZ3VMDNh/M+1pQPJoq2+u0gsttB+StRogpHW8s5XxlXNEhTvC69nywJya9m+/I9w3BIOlVmeafYfZv6fuuoeHLY9mQADuhCZ2zuAy/i39IapFJPLem0MjlD/kS5LP6wqLp72BuNmoVPGUi9hMhHri8Bsev/Y= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Rasesh.Mody@cavium.com; Received: from cavium.com (198.186.0.2) by DM5PR0701MB3671.namprd07.prod.outlook.com (2603:10b6:4:7e::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.776.11; Tue, 22 May 2018 23:16:16 +0000 From: Rasesh Mody To: dev@dpdk.org Cc: Rasesh Mody , ferruh.yigit@intel.com, Dept-EngDPDKDev@cavium.com, stable@dpdk.org Date: Tue, 22 May 2018 16:16:04 -0700 Message-Id: <1527030964-17525-2-git-send-email-rasesh.mody@cavium.com> X-Mailer: git-send-email 1.7.10.3 In-Reply-To: <1527030964-17525-1-git-send-email-rasesh.mody@cavium.com> References: <1527030964-17525-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: CO2PR04CA0065.namprd04.prod.outlook.com (2603:10b6:102:1::33) To DM5PR0701MB3671.namprd07.prod.outlook.com (2603:10b6:4:7e::19) X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:DM5PR0701MB3671; X-Microsoft-Exchange-Diagnostics: 1; DM5PR0701MB3671; 3:Bh4BtQzEldPeMLUqDK570iBCD/+Oq/hnCck/ErB3G5FFPt9kJn2uOAFsYKlFVfmxoKTNHjCb3TpboPiIwL788qaHQQURpxFqW2Q3xEAswzW1a84j2f6gj1EjcmhSXomUyFT+KgRP7vD7hfLVZiNd/GtIvpPbvjzmcqVq6xbk3k6ubywJbZjN6vidNTI+BlM+8kezqcHwUqsthTqnAmKrUERQUoEUrEzhO8LK6CU6kJQPqPw67LcZ3fAR01yxRy/R; 25:u7vo7Vb59iDHVW2Lh/jN8HN0YSAFQqGbANlcC7GrincF0CLGBWjMfREwWdQadKOUgrci1tulpEtQVxhglOgqWy+hSJWXBYqRL9MVvtIZTDZxNSRoBFLTD9ok/igiwceQb09puoxiS8pOz2X243jyaynQpyVAvWpBPZXdBUiImgwr86AFG6G5ExoSVJPrQgZj1FbpaWYsdYblrZcowrAD5WcwSnm9wMxdzzBpa14Nb1zbYGbPx2cFO5UIHUYreGQeGXEncYWYYfLYBHvX2A1UKrFVTnL1gojc2aPHNy6NbLuQ+xoggRa/IhVT4JDD9wzOLmPrAyfdEMKmxqh7mz0WfQ==; 31:LszpOhTi8NOsXQ0ddhEZTgrfqVZikyRyR7GOp904sy252+WX01DnFpCPTXCz7HAwCyX+XgEQdN2cwQUwe2QeQv829ReFbwJ8qvOox6/JdJRfK0O9j8OsOIWtSpQoIu5iCjt+dKIFdLl3R9Y/2Zb8/qTbjXqb2TA5+4cMlJFxgcarc44i18VJTJNB8YHoPn269J6PfkDoRHrDJECATcoBuR5bvd1mjAVNR6rywuuUHOQ= X-MS-TrafficTypeDiagnostic: DM5PR0701MB3671: X-Microsoft-Exchange-Diagnostics: 1; DM5PR0701MB3671; 20:XKBBiuw+rDKXAz1/M7vgSlAzwhCKoINOdYhjWMOTyqKiv0+Dp4/qo+1xgFDpkNqvO6SNXluQ4IFPyXWzt3Mxsq2UJcuohiASyop8qX7YjDlUL7xY4YKxyNLB4UFvv/6K3UFH+BEdZEqq8nF9+8VBIgK0S5ceXtbyouJfT/rLiyNq5PXC8Gh7Qsw7jvH2EPaWnaS+E7wRMi1GUGxPEdUu5XJVTz2LffnMWojz4tLHXXI+cdKoSWbub+kp1mswRj3narvPa9MsNKO7PWGC5YmDqi7uTjClYxl4fKWEljyYkKxGnCexka0bRuVrcmdVRsqLKGzDyGLRVaua3/F/3JV+nwO9a1n8Wth8bWOk9CV893GqLM4NyVmOtLFoYHYpmDGX4Cab9PxK9Jj0yUW2Krb5FZEnEew2IISt1RHhW1Ut9WBI4/h6uH52rZgTic/jxyZLNr4oi8vYptrEYPCVnDE6cp46TIWjFCaJAeojOoNaL89Wmnsf1tZFUq+RGwn81iJ9; 4:xshMlhgYykIg12TOeFfzIey9AZiAzS3n9SgLbDJUyEYJp03DKR42SUWD5i4NbHuYQZl0To2KritD5ZZWMleMRaZk9QUMN72geY27KTpHGvhobNze6QHGaWbucpJE23533u0oZatbqYBINZAjStLAr8Py6ifd0L5x+pyUjd5x6+187ikt1Ks6FjUYGnsfPrmaaFpSgqTh6p/Viv9mWj7dh31poi+F+zIzBxTUXw8svRZbNdaSDPRU1OBicCJt8gGmYH17WbstM0i5OBCuoy8DJZioqJClrdDB9xdlcJt6m7kIAPHHqNv1k+Q/HrJe3kaE X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(788757137089); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(3231254)(944501410)(52105095)(3002001)(149027)(150027)(6041310)(20161123564045)(20161123558120)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011)(7699016); SRVR:DM5PR0701MB3671; BCL:0; PCL:0; RULEID:; SRVR:DM5PR0701MB3671; X-Forefront-PRVS: 0680FADD48 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(366004)(396003)(39380400002)(39860400002)(346002)(199004)(189003)(106356001)(55016002)(3846002)(956004)(476003)(2616005)(105586002)(50466002)(446003)(11346002)(2906002)(53936002)(48376002)(21086003)(7736002)(16526019)(59450400001)(6116002)(386003)(305945005)(26005)(186003)(36756003)(2351001)(69596002)(66066001)(575784001)(478600001)(316002)(8936002)(81156014)(44832011)(6666003)(76176011)(4326008)(6916009)(68736007)(2361001)(7696005)(25786009)(52116002)(50226002)(8676002)(86362001)(97736004)(72206003)(16586007)(47776003)(5660300001)(51416003)(81166006)(4720700003)(486006)(309714004); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR0701MB3671; H:cavium.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR0701MB3671; 23:X24yKxxwGyVSqQfarG1+/YMkMj4yrKBH6d06IDd?= =?us-ascii?Q?rZD1HB+O1uIlAwwINM7N3ZazE3F5E1ejLhKts1gWyHmHA62Bfqmlmlk8SVM0?= =?us-ascii?Q?wloT8qWZ0BOO12AxFwbhrcsoh9E9lpNWv1b6CfpD/OV6FO6j4gpgfpl2PG1+?= =?us-ascii?Q?6+wansSen+CZRb8Qi5l+Ktd+t0SzgmChuxYuwb1ewV7OXWp60H4fGdTT8/o4?= =?us-ascii?Q?HcMQuTuux0QKUSDn8nqKnjtyxz/PExTa/dP2ozinmuDPCH7o6FnvctfMmn/G?= =?us-ascii?Q?DIWogwLRApwOziHEJ0FEyLAQAUVYMQmsfatw8utxaIZgXgFIph1XaOgm/xvu?= =?us-ascii?Q?J2v5RrD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VjlMOVQKMzLoUL0=; 24:bOPJn5NEY2roff2zzklhx8rD8KU1LXEzUWFnD2e98HRMw6rn7SriRx6tfJ0S2c6eJ4+ugYcZqOGLhTkh3Bd18kUxuXkh5MdMD345xtXrTO4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM5PR0701MB3671; 7:ioz6SyopObyvjHXAVuln0kmzlXXoams/dEAWgXMb5BNVdRHoLxEkPBAtGqryTudT5K0LgkeYk30X0qL/i+m9ua7xHw2/QcPGFOVLjGL0XZZbLcZ0ZxBsGDjzZDq7ukSXCEdEbKZ+LsRp/Q5z1la3afwIlPO8RVG32I/1vbeJFlrMAaxW+qDArn2aB2Qq4/xzQHCo5vo22Abw4WI+mCtHpavLhK+bl9Mu8bYetsEONaJQs/2Pu0H+O4D4c1YTokKZ X-MS-Office365-Filtering-Correlation-Id: d8c870b7-d6f3-4f98-d6ee-08d5c03a0561 X-OriginatorOrg: cavium.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 May 2018 23:16:16.8571 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d8c870b7-d6f3-4f98-d6ee-08d5c03a0561 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR0701MB3671 Subject: [dpdk-dev] [PATCH 2/2] net/qede: fix for devargs 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, 22 May 2018 23:16:20 -0000 Do not error out on invalid devarg, log the message and continue. Decide updating the tx-switching config in check args. Add a check for VF when disabling tx-switching Fixes: 612ce81b2007 ("net/qede: add devargs to disable NPAR Tx switching") Fixes: f64b91b0eb5d ("net/qede: replace config option with run-time arg") Cc: stable@dpdk.org Signed-off-by: Rasesh Mody --- drivers/net/qede/qede_ethdev.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index 8c320c6..4ab1572 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -518,14 +518,9 @@ int qede_activate_vport(struct rte_eth_dev *eth_dev, bool flg) params.update_vport_active_tx_flg = 1; params.vport_active_rx_flg = flg; params.vport_active_tx_flg = flg; - if (!qdev->enable_tx_switching) { - if ((QEDE_NPAR_TX_SWITCHING != NULL) || - ((QEDE_VF_TX_SWITCHING != NULL) && IS_VF(edev))) { - params.update_tx_switching_flg = 1; - params.tx_switching_flg = !flg; - DP_INFO(edev, "%s tx-switching is disabled\n", - QEDE_NPAR_TX_SWITCHING ? "NPAR" : "VF"); - } + if (~qdev->enable_tx_switching & flg) { + params.update_tx_switching_flg = 1; + params.tx_switching_flg = !flg; } for_each_hwfn(edev, i) { p_hwfn = &edev->hwfns[i]; @@ -1362,8 +1357,12 @@ static int qede_args_check(const char *key, const char *val, void *opaque) } if ((strcmp(QEDE_NPAR_TX_SWITCHING, key) == 0) || - (strcmp(QEDE_VF_TX_SWITCHING, key) == 0)) + ((strcmp(QEDE_VF_TX_SWITCHING, key) == 0) && IS_VF(edev))) { qdev->enable_tx_switching = !!tmp; + DP_INFO(edev, "Disabling %s tx-switching\n", + strcmp(QEDE_NPAR_TX_SWITCHING, key) ? + "VF" : "NPAR"); + } return ret; } @@ -1438,7 +1437,8 @@ static int qede_dev_configure(struct rte_eth_dev *eth_dev) /* Parse devargs and fix up rxmode */ if (qede_args(eth_dev)) - return -ENOTSUP; + DP_NOTICE(edev, false, + "Invalid devargs supplied, requested change will not take effect\n"); if (!(rxmode->mq_mode == ETH_MQ_RX_NONE || rxmode->mq_mode == ETH_MQ_RX_RSS)) { -- 1.7.10.3