From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0F5FAA0547; Mon, 24 May 2021 13:53:38 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 911FE4003E; Mon, 24 May 2021 13:53:38 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150109.outbound.protection.outlook.com [40.107.15.109]) by mails.dpdk.org (Postfix) with ESMTP id 598AB4003C for ; Mon, 24 May 2021 13:53:36 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=d7tiFrDOAzUeU8OZ8nJf4XtXE+NjDSXoRPucwZ23G/Wv/E4Z10jVhzCzh1dG20BaHqallpAjf6N80S1udS7+azJYbBjSFosbj8OufeEslENGFzZSittX4zgyqaVE7Of7gRQpR5G1F4O7jpfl+cpBL+MR6qbA+q0H8I7hax4mEWTXIUK+WFACrT/gryMmdpvvIYaaMszUYdBpuqOAVqBT3EDh26Pp6p4aLtmoTFV+/vXM723hZop66pV5celqeH1C7hNHZSB6Sjz+8xLyVS5DzQLir4pqhQMcKc7ZWUYGG1Hu0xAw6xkX+x8v17eYqR/gPklOfULWMhUfydkCQrPpwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G+aDgfEAYloaob+crD73gL5874bbEZB6GxVVvg3h9zQ=; b=XroJtkrRbuQQSQIiCTR+tT4BgYgs/XbM5mtO9evDuEyBJ5lB4mXaDoBvtKMxfYK1VNzKZsQ07Z1yas/NBE/DkJipGCL8ftfzr2juZcHLNHKDdt8rfLRMbSuHkxIWmrWJ5d+szpP5uRway4NGkD5IMupc8xHroQZCmrjoUt0ifLySVppp7PdPlLYzBr+oZuJCi4ES90tXlTJ2jOB9P5TNKRUIZNhzq9eA2TBXJkaIkjtKWlsWrlRoM8S9eDcg4k9tVb5KDlQGcjKNs9c3n/VfdQBQeyBUmqM8Q8p8k9WzVcnI2C2c/U2yZj68j+4diVDvwhqEKquvxZ9D6s+7Ds+C2w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 131.228.2.17) smtp.rcpttodomain=intel.com smtp.mailfrom=nokia-sbell.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nokia-sbell.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nokia.onmicrosoft.com; s=selector1-nokia-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G+aDgfEAYloaob+crD73gL5874bbEZB6GxVVvg3h9zQ=; b=CogHRQKY/VNrdLI4AjDNLEpIsb09E7ULbwYbnRpYK+sV+NFp+gjC6tECg4h2h4GJ88yrL3x36vnOTN38l2ZLgiG01B45mwfEzb04j0EOqXYzMLG/zf0NTloxhDH0I/YUxI0AEWCvF52rcClmAUy4aI32RvWbEme/TKoaenw4kVs= Received: from MR2P264CA0130.FRAP264.PROD.OUTLOOK.COM (2603:10a6:500:30::22) by AM0PR07MB5394.eurprd07.prod.outlook.com (2603:10a6:208:10c::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4173.11; Mon, 24 May 2021 11:53:35 +0000 Received: from VE1EUR03FT014.eop-EUR03.prod.protection.outlook.com (2603:10a6:500:30:cafe::f) by MR2P264CA0130.outlook.office365.com (2603:10a6:500:30::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4150.27 via Frontend Transport; Mon, 24 May 2021 11:53:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 131.228.2.17) smtp.mailfrom=nokia-sbell.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=pass action=none header.from=nokia-sbell.com; Received-SPF: Pass (protection.outlook.com: domain of nokia-sbell.com designates 131.228.2.17 as permitted sender) receiver=protection.outlook.com; client-ip=131.228.2.17; helo=fihe3nok0735.emea.nsn-net.net; Received: from fihe3nok0735.emea.nsn-net.net (131.228.2.17) by VE1EUR03FT014.mail.protection.outlook.com (10.152.19.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4129.25 via Frontend Transport; Mon, 24 May 2021 11:53:33 +0000 Received: from hzling45.china.nsn-net.net (hzling45.china.nsn-net.net [10.159.218.88]) by fihe3nok0735.emea.nsn-net.net (GMO) with ESMTP id 14OBrWGR015410; Mon, 24 May 2021 11:53:32 GMT Received: by hzling45.china.nsn-net.net (Postfix, from userid 61424175) id 0A705411CB; Mon, 24 May 2021 19:53:31 +0800 (CST) From: Wu Jianyue To: haiyue.wang@intel.com Cc: dev@dpdk.org Date: Mon, 24 May 2021 19:53:29 +0800 Message-Id: <20210524115329.40525-1-jianyue.wu@nokia-sbell.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email Content-Type: text/plain X-MS-Office365-Filtering-Correlation-Id: f9bca41f-bd00-4014-2a2e-08d91eaa8edd X-MS-TrafficTypeDiagnostic: AM0PR07MB5394: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:144; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VBlu1P+CuMz0fkEVqgRVYMvFHZCzCgRbr8IunIVHC2QwLqp3Bi8NjW2+guXUKth7dMEAulR9Rm0Lh30gKCg3fa9n8Gy14BLNvhwVkL8auvJYNQwS/6453dKf9Cy01yHRarM0c99GKx5SKjtON86s4AyzhzZyQj0Xgpv4nK0Q8XO/Ry2X5abyEgoeY/HAas5Zj4OAZGdI+MauuZo+XwZqm0HxzAFRvJf8u5HHi1eDw+NMhZIN83EKPdJwy0IbIjkRoONhjyrLkYYdMnty7oMZRIPBsM5zIKPtKFgHbmjvS4vwRyJnSSwQB3rVXSrmb2AIcGc7kpZJvK4gmuoIsfl/6PnzU2SJmChq9hawQCOXrdJNbS7A6la6JUDBfO3Ozu8L9kft2X0ywKFd/9U6/vN6Q/vZsULbH/yZ0BWrC7ChtHUmFOEe6QAa0lN2ZIdI45xs8ZP4sHuiIHGd3qbsIyCYhjgr7FcZhAnApyE0T45cVeJPMcmSJinOQHzzaNwgnJM0m4JN6j3pmKSwCF8T6p8E5HcUUY2oF25ncsgaRQx1ay6Dyatb5lmu1rt09ix0ZZA2zrqroYZDd4bVItk1ReujdE9sFKWL1+RsvzAO7spdURaXM+9cOJYVfhS9dD96yzGCHuhOlTzustP9j9YCQ4iIXgWI3IpGa5c8fxzLHQV2v2lMoBpvf1VlSQz6daNITmPN X-Forefront-Antispam-Report: CIP:131.228.2.17; CTRY:FI; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:fihe3nok0735.emea.nsn-net.net; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(4636009)(136003)(346002)(396003)(39860400002)(376002)(46966006)(36840700001)(82740400003)(478600001)(36756003)(81166007)(186003)(356005)(86362001)(2906002)(47076005)(83380400001)(6266002)(2616005)(336012)(1076003)(8936002)(36860700001)(4326008)(8676002)(5660300002)(70586007)(70206006)(26005)(6916009)(42186006)(316002)(82310400003)(36900700001); DIR:OUT; SFP:1102; X-OriginatorOrg: nokia-sbell.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 May 2021 11:53:33.8718 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f9bca41f-bd00-4014-2a2e-08d91eaa8edd X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.17]; Helo=[fihe3nok0735.emea.nsn-net.net] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT014.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR07MB5394 Subject: [dpdk-dev] [PATCH] ixgbe: Add runtime tx/rx queue setup for X550 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" X550 NIC can support runtime tx/rx queue setup. Add capacity in dev_capa and queue offload capacity. Signed-off-by: Wu Jianyue --- drivers/net/ixgbe/ixgbe_ethdev.c | 22 ++++++++++++++++++++++ drivers/net/ixgbe/ixgbe_rxtx.c | 21 +++++++++++++++++++-- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c index b5371568b..0839426b4 100644 --- a/drivers/net/ixgbe/ixgbe_ethdev.c +++ b/drivers/net/ixgbe/ixgbe_ethdev.c @@ -3915,6 +3915,17 @@ ixgbe_dev_info_get(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->default_rxportconf.ring_size = 256; dev_info->default_txportconf.ring_size = 256; + if (hw->mac.type == ixgbe_mac_X550 || + hw->mac.type == ixgbe_mac_X550EM_x || + hw->mac.type == ixgbe_mac_X550EM_a || + hw->mac.type == ixgbe_mac_X550_vf || + hw->mac.type == ixgbe_mac_X550EM_x_vf || + hw->mac.type == ixgbe_mac_X550EM_a_vf) { + dev_info->dev_capa = + RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP | + RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP; + } + return 0; } @@ -4010,6 +4021,17 @@ ixgbevf_dev_info_get(struct rte_eth_dev *dev, dev_info->rx_desc_lim = rx_desc_lim; dev_info->tx_desc_lim = tx_desc_lim; + if (hw->mac.type == ixgbe_mac_X550 || + hw->mac.type == ixgbe_mac_X550EM_x || + hw->mac.type == ixgbe_mac_X550EM_a || + hw->mac.type == ixgbe_mac_X550_vf || + hw->mac.type == ixgbe_mac_X550EM_x_vf || + hw->mac.type == ixgbe_mac_X550EM_a_vf) { + dev_info->dev_capa = + RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP | + RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP; + } + return 0; } diff --git a/drivers/net/ixgbe/ixgbe_rxtx.c b/drivers/net/ixgbe/ixgbe_rxtx.c index d69f36e97..ea813aefe 100644 --- a/drivers/net/ixgbe/ixgbe_rxtx.c +++ b/drivers/net/ixgbe/ixgbe_rxtx.c @@ -2571,9 +2571,18 @@ ixgbe_set_tx_function(struct rte_eth_dev *dev, struct ixgbe_tx_queue *txq) uint64_t ixgbe_get_tx_queue_offloads(struct rte_eth_dev *dev) { - RTE_SET_USED(dev); + uint64_t offloads = 0; + struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); - return 0; + if (hw->mac.type == ixgbe_mac_X550 || + hw->mac.type == ixgbe_mac_X550EM_x || + hw->mac.type == ixgbe_mac_X550EM_a || + hw->mac.type == ixgbe_mac_X550_vf || + hw->mac.type == ixgbe_mac_X550EM_x_vf || + hw->mac.type == ixgbe_mac_X550EM_a_vf) + offloads |= RTE_ETH_DEV_CAPA_RUNTIME_TX_QUEUE_SETUP; + + return offloads; } uint64_t @@ -3008,6 +3017,14 @@ ixgbe_get_rx_queue_offloads(struct rte_eth_dev *dev) if (hw->mac.type != ixgbe_mac_82598EB) offloads |= DEV_RX_OFFLOAD_VLAN_STRIP; + if (hw->mac.type == ixgbe_mac_X550 || + hw->mac.type == ixgbe_mac_X550EM_x || + hw->mac.type == ixgbe_mac_X550EM_a || + hw->mac.type == ixgbe_mac_X550_vf || + hw->mac.type == ixgbe_mac_X550EM_x_vf || + hw->mac.type == ixgbe_mac_X550EM_a_vf) + offloads |= RTE_ETH_DEV_CAPA_RUNTIME_RX_QUEUE_SETUP; + return offloads; } -- 2.24.1