From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0088.outbound.protection.outlook.com [104.47.41.88]) by dpdk.org (Postfix) with ESMTP id F02BA1B5EC; Tue, 7 Nov 2017 09:35:27 +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=GFxHwXN/6ld8qSotOSIqczwx4/J0zxltzhVjwWCXVvw=; b=bk02OFnnNyWxaOUZMsQZuUC0XLikjwcbHflUxZVsDjiG72q4kneNxIj/q1u9MU3HCYStY+mSINcIPZvMkOFAwSVi8b7kzBzK1x5TlMD8jE8/zIsuDbB2dsQySkriIl6fyyVALgciHkZDhes2RyjWXJiPxTUxXh+4zFBP4/1S44w= 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:25 +0000 From: Rasesh Mody To: dev@dpdk.org Cc: Harish Patil , ferruh.yigit@intel.com, Dept-EngDPDKDev@cavium.com, stable@dpdk.org Date: Tue, 7 Nov 2017 00:34:18 -0800 Message-Id: <1510043665-8160-2-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: 4a2d81b3-a111-4ea8-da5e-08d525ba7ef4 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:YSMWTElF1pdWfCfQGQzatGJzcLvGMWWLSrpwsyJ8d5Lv2u9+A1SMc3wmLVkUQE3LfWjIpxZQjTbpQSWRltipi6jcxMisXSR+G236AlTiuL7ot7NjrPfwHu+eoTKX3kOy4At6Vm9+7AOsyabYLLaVVWf2Q3md5SBO6EGt1TOwwJMI6RwJkUhjOKpNe3ntxdRctRbuwMi1z75Le2iqjA+RCHl+ctK69qiUEVVTRltEf0ytowKknmjikGozuqUFpFZa; 25:IwaxY8WrOsrIfv2t7snzBXd+lmjAZr3gKbzuFwVStmkeTbd8yz4o5rKoyasm/WOLufc1UzSELWuGDBIirwRZ6yxYvnQBvUfASQt4MlQD2Bl2wUtl0pIVJh/AZEx6P3gEwzVfmtB+QrjHj+/SLjedOV0aggVVoyORshW9eF7QzZIj6fqY5JyFjQCIUh26rWIjS+WTypWs8d9FyhyfaDlKggyL7g2Y0EpdHVT2WE+GEzPHc6uO0SaZMD5qt7xSHjQrSJjuAHfAKnlwS168kXJhRMv+qSw5u8NLMOo1YnjKctwPuakZXimafGGaaUCOWr1xM0s0bsa+DFM0Yd2EB6hjEg==; 31:Jdmkm3rG/9QFoiLtJbxbsRZ5ET3CuoczAg72453E2pYXjPBFc7gYRgKkTn+MelOM3e/AREr9IOjWA4dK5RQT2y6vDwDNeZaSG7cyDKm169v+S7Jb8WixgNCblLhplXuYbrZg9/yO8SBNfMeZmbJYYygZQxbHOLVNuPt9c+Bt9tbQpkqF7rDpIMMoX9aAAjyJUEDMbWQ9kWKqBcuhY2G/NJfiyi0cRomqsl8wAYZQVWs= X-MS-TrafficTypeDiagnostic: CY4PR0701MB3827: X-Microsoft-Exchange-Diagnostics: 1; CY4PR0701MB3827; 20:l/DCb1SVvikXr0tAO4WWkE0fEaeM6Ul71nA5d9OjcatpwvYsvQJ2DvOtHDJ/T/WiFGz9S+YB1Ay22lZuBb8Be72tSpe7Azu4XPMUXLyV4jmWJTXZt6vCaE+RIrMvJ6e3iTOJs+AqiZvVPS9/BDM2wh00HT+bnBBgMgQiXd1u7jfSh5PEYxAkocdkR6rCIpr4b3AQGj0SGnp9hR3K4qxfga4LTI8NnGHsvJBSX0cUt2krV91bue/Z9/tVO6i09+gPIPRMSUQqp7H+sf6dFClmoY3LroyJHOb971xWLlQg7O0HUK4ewO4PxWIoVir0RhsQj/xpiJF80XZ8mTTTxip3WJoWCXRaiPntLb8pH0EZ91apNz6DrNT1z/WbZeGlrMfb4U1B8sgjAfsTuTmUyqpGCqq24mYntujtbi2FfoTOoXW5RbWx1GOb7H6K0rwf3dFrXORkUu7+Sq0dvESa4P8nIsvDLm2D+/QN5Az9k7l5fmbMWMdYhodrWr1uwCz+tqWr; 4:LqKJJK7wHpxYHGE1LomdxnjjTdx8KFFQ2PQF4f4dAsSbpT/1d0Cm4WVBC7tXoAhh0PtCyz9yT+r3OMVDmw7cRSe5ZHnI4zPntKXGfCZw4CNC9AcQClHPEQraPrk4qnA98GmK4sRdrq8AvkBJ90a3CaSkz8ipTMd3ZC89dkCoiBGI9BGieNJnn0SkbP4ykyVLqbrQ7uXbbX08AN08irdz3bzpFddL7PLQstu3uL6gqr17fo9nYjN6KI6iJSSrTY15t+8X/OryECgyqqnvLC48qw== 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)(575784001)(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)(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:+3rFJSU6P6UTGNUxL1X7N3eR4nSNnKgTcAhtD64?= =?us-ascii?Q?FJnv1Ck8HSxJdW8fA5haX4L8DuIMEuf/ZDuat87jSA3hacf5wK/vCpx9NK0d?= =?us-ascii?Q?DLQBUKJ8tqOq3WBV9KPwTVJX6tkNCCsPizWznsoYkjK0SPo1nGen7/a1MQku?= =?us-ascii?Q?N1XTV2gj6gYjrUfy7owID+7ZJbfsEYDOD7thsr0yHafp+LPr2tHZ1rMZ+P7x?= =?us-ascii?Q?VqN2XUqvmuHLkZLegQUP3nju0RCFwv+eU+b/7Iy5cL07oyhk4nir3q7ug4vZ?= =?us-ascii?Q?0qZ4X98QGsXZeCueit/j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ossTenant-OriginalArrivalTime: 07 Nov 2017 08:35:25.7069 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4a2d81b3-a111-4ea8-da5e-08d525ba7ef4 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 1/8] net/qede: fix to disable per-VF Tx switching feature 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:28 -0000 From: Harish Patil Provide a knob to control per-VF Tx switching feature by adding a config option, CONFIG_RTE_LIBRTE_QEDE_VF_TX_SWITCH. By default, it will be kept in disabled state for better performance with small sized frames. Fixes: 2ea6f76aff40 ("qede: add core driver") Cc: stable@dpdk.org Signed-off-by: Harish Patil --- config/common_base | 1 + drivers/net/qede/qede_ethdev.c | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/config/common_base b/config/common_base index 82ee754..a22d0b1 100644 --- a/config/common_base +++ b/config/common_base @@ -410,6 +410,7 @@ CONFIG_RTE_LIBRTE_QEDE_DEBUG_INFO=n CONFIG_RTE_LIBRTE_QEDE_DEBUG_DRIVER=n CONFIG_RTE_LIBRTE_QEDE_DEBUG_TX=n CONFIG_RTE_LIBRTE_QEDE_DEBUG_RX=n +CONFIG_RTE_LIBRTE_QEDE_VF_TX_SWITCH=n #Provides abs path/name of the firmware file. #Empty string denotes driver will use default firmware CONFIG_RTE_LIBRTE_QEDE_FW="" diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c index 661d938..c228b06 100644 --- a/drivers/net/qede/qede_ethdev.c +++ b/drivers/net/qede/qede_ethdev.c @@ -453,6 +453,12 @@ 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; +#ifndef RTE_LIBRTE_QEDE_VF_TX_SWITCH + if (IS_VF(edev)) { + params.update_tx_switching_flg = 1; + params.tx_switching_flg = !flg; + } +#endif for_each_hwfn(edev, i) { p_hwfn = &edev->hwfns[i]; params.opaque_fid = p_hwfn->hw_info.opaque_fid; @@ -463,7 +469,8 @@ int qede_activate_vport(struct rte_eth_dev *eth_dev, bool flg) break; } } - DP_INFO(edev, "vport %s\n", flg ? "activated" : "deactivated"); + DP_INFO(edev, "vport %s VF tx-switch %s\n", flg ? "activated" : "deactivated", + params.tx_switching_flg ? "enabled" : "disabled"); return rc; } -- 1.7.10.3