From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40067.outbound.protection.outlook.com [40.107.4.67]) by dpdk.org (Postfix) with ESMTP id BA62E2B91 for ; Fri, 6 Jan 2017 01:49:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=bkzXciOKgzaKU43qe6aOsDYCeEPRFqqNZ/RRUeALEKE=; b=vV6LDRGSy0W/8M2T+YbjxIhy4hOljyDa9J6REtvE8XB27aPqAX97FMcjmOgUboMdqdCUIMVo4OfvDIzw8F9DfncVWHRc6k2We/D6WP2UM4f3PKzg99XrCR6fZcs226K7MZwHkmN+T8EGSCtTc0EPuHEbnZeFO+wt91XDX1YuI4w= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from mellanox.com (12.250.235.110) by DB6PR0501MB2455.eurprd05.prod.outlook.com (10.168.73.136) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10; Fri, 6 Jan 2017 00:49:44 +0000 From: Yongseok Koh To: CC: , , Yongseok Koh Date: Thu, 5 Jan 2017 16:49:31 -0800 Message-ID: <20170106004931.2015-1-yskoh@mellanox.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170105023219.10146-1-yskoh@mellanox.com> References: <20170105023219.10146-1-yskoh@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [12.250.235.110] X-ClientProxiedBy: CY1PR03CA0019.namprd03.prod.outlook.com (10.174.128.29) To DB6PR0501MB2455.eurprd05.prod.outlook.com (10.168.73.136) X-MS-Office365-Filtering-Correlation-Id: ffa30d0a-73e0-4fc5-04da-08d435cde8f8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:DB6PR0501MB2455; X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jTcBNMmFgBz8wsE+KsuSz+TT8E9PNLuQS7msSRcuJOFC/4sszyVkbeTizdD/4TEkxkkkRut2lkKycqFEAqO5f1CHWQrSGg8NzQBBB+alHIk/sChGqSZJpQg3gCC4MCjZeZh3AlgfOmKRz+4ucFVeMDG8iZQ/y+I7Yo= X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2455; 31:IO+1tZMGf8tmbCvAmByDQwdPeesGj0pld5beRtg55Lm/GO/mAix6/Brt7pY4NeZNalVcxdVg8t3dPJ58jwKKNd28q8ZDi3jJQEJjDziHljVvHsuM5b67QlFDbHzIkv9zHaBtZbeBaQBJ+a1oIWMpvMV5DQdikzIdTLZz9peHyYsc3OWPKGX0rH2FHrDe8IYNaimHq0c5w8EU5ifkeGLzRzLwUILtB7fetF7N0PNaCn0ofs1/IQHoJrbbAJ1UOxLgle30Av+k2C13TuDBEk/nXQ==; 20:QQLgMJxUSEzmJQk5lORwteI1fOhkiK65j1vRpvajIW9Id5IQhjX5dLUHSs40Oq7nL6atslPVwy3krg1ys3i6P9/SMV77OZgTd1KRg9i2xTACXFCNQOl9t4lLFIJPnAssdzFh9VABL20isGTJ51vdtxQq+kaUsFMjqEWg46mZLrt0vBYJXbn3GO31z3UA57s7lz6jlzs/InuqvJprsYVjBOBAo77SSDbtdkn3WvFSGVb+v+uRVs76LGs1gNRp4OQfLub6Akd07/CFrrKg9U8Bi6gR2l78ipM6lrq22Q18sK7dZbPiNZ4d1KA0waImlMskU5s7ttQczaEUtk/tQ8TfVxcc0n8ibheCR2abk+pGvcfbbITFoV0R6MjV2d2YochpyOmUGsLoR/YNk8d5XXSIdYbuRyZ5IIjbt2GZnvrfsxRiS9gv7tWp3VH5t8+lwh/YD9bx8WTpwp/2gbZ8724NZ66K7kdx3WtAxh6H+IKMXQv1WWP+4uSdd3rqT/s6gJCp X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(171992500451332); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(6072148); SRVR:DB6PR0501MB2455; BCL:0; PCL:0; RULEID:; SRVR:DB6PR0501MB2455; X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2455; 4:gzbbW1SnKGUjv8rZJHSQEtP7EY4K6aggVkTFGtUab5w43RErURP4nHFPnX52iveICC/dUACjUr/EtvK2+ChqExMBzdMAxvPJlJEfkUS69JpgKa/vxBcw84SXK0nl6deMft3ru7O5SMexIBcc0N4ftMSaPtjyvDCJGG1dTJh+hFfuqV0CJLFGWR3cFQfBWNMM9Aq4O7JLRxwAGrw52x4RPkiHmZoYvoBPG+JF1zvihzCXL2tkFeiBCAYdbiXv5IWP0XEWbLx1lMe3JT5/HsFgHo87+o1NahEyYG3bxaLwX7W7/UH93cyFQpPPnhnXeDtRUAhskghF3PvR2B9YC8wSZS4As9o4C+TjEv1eo33d/eVp/QY+cpNn7/rmqDEv05ArIUBtj2G+KXS9dF8fU0uaJ+8P/DFAKdo16KXO5TYtp/WWfR3hnQf9/WXh/JNESKh+Jqtvf8S6OeC0cQigSUHgp+xMCbPQ8YdyAsn0uHuxxLWzCd01d+ukFiOYfTLcJZ4fHO5xopD+UXyCrEPfhL7HJCIkzQ3tXIbDb5hhYR77Mw8jr+TzXkAoUEw/urGLBl90JpxNk6hO4ji+0L+h/Vmv2a+0G7iIw8BnD2+2iXgyI+oY4H7PuqoEsqZKxemUDr9k3aWCh4y0G9O9nnOlyAj9FA== X-Forefront-PRVS: 01792087B6 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(979002)(6009001)(7916002)(39450400003)(39840400002)(39410400002)(39860400002)(39850400002)(189002)(199003)(55016002)(110136003)(50226002)(6306002)(33026002)(92566002)(101416001)(2906002)(6916009)(4326007)(33646002)(47776003)(66066001)(3846002)(189998001)(4001430100002)(7736002)(76176999)(105586002)(86362001)(6116002)(97736004)(2351001)(1076002)(2950100002)(54906002)(25786008)(36756003)(38730400001)(106356001)(107886002)(6666003)(5003940100001)(69596002)(42186005)(68736007)(50466002)(48376002)(50986999)(81166006)(5660300001)(305945005)(81156014)(8676002)(21086003)(309714004)(19627235001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB6PR0501MB2455; H:mellanox.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DB6PR0501MB2455; 23:wsKEYhsDKWcess0onP9bBfmumREhlB3Y3UTMs11?= =?us-ascii?Q?N0XBycQA9gOniWB5/KVKXcEBWkJANMh27CxulHMamthCOogC1R0qSX/P5JHy?= =?us-ascii?Q?zgOvqP2VYQSAYrQ8mfQygZN+uVR/EoVQsAnqjS6uVmDzrpjNHNkrPKJUQUmz?= =?us-ascii?Q?N2f7iGbGwbH3fUCrZar5XE+sPaiOOVAdCYh9nC1+uo0A8x5x/ltIgntBuaUP?= =?us-ascii?Q?UybyvRNFdeqpNvEIUSUGBc/BQIjVzOc75vdqlACt8ilnxRtgiO0HXVRrTfzb?= =?us-ascii?Q?bGNqCjf4PRuCCzKuv/atKJn6OMsj+EmJPJCbdFooOBzu7jLZNQgQFdKugYzd?= =?us-ascii?Q?ohM+PcGOSBTEYvtR2499cQ5dO69ufepEoE0KPWqnmqFPCG6qNGqIYaMj2la9?= =?us-ascii?Q?dUXA8GibqoZiC3P6+9w0h3faGCsHDulPToslO+RwVqsKncPKi12rxbrWFdMr?= =?us-ascii?Q?Ahq4WmnoAfOf4lpRXV5xvZ6grs/rOpzM1WvZYDzNGCzlsK5ryDbsxe1vvy4L?= =?us-ascii?Q?268lgsRhxowA7AL8U0TqiwB1X1afcVTKBusVR7eKA78ZzjvdGQv3/POfEJqx?= =?us-ascii?Q?DrtfEkAuoN6WAoj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BVL?= =?us-ascii?Q?YC6AuUDWbQ+ZQxg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2455; 6:/ueex9iWyh7i/WKnOioxjhywUq97Uv2Q0Ae/mAfr7bmXrNP4uFqu7gUvSWbSbuWlQaonlY1dsmeahwlQFAqCxx3asrCIr0/913WCGIsFP//MQxSLMFDyu0pqrdxid1j1PSasxoZBU9bV0Lg6zlgMUj6DaMdSjqrngt4W99JxpQ99ruwVoSOth+bcXcazzdWV7oo0MrnHoG39bVGK0aeKotfjD84dng/usW575eDhQMM5m0uQcJkU9pMbp995SgXTUZhVnrXlwDWYxuEj0zcaSpYTCpdnAwzCweIRQL3VhFx2J3rqssLAQseyUnNvq7hgb6dTJcPO3TTkORK/WIwmecEFlUuPietVWw5q3UaDHvQw5xu8R95+zhYONEXgi/M1b+ttW0JKR7S+YXKX6AlWRVTKhHxAAGTUDbOEVAU5E/GQV/ktumDRnJU1LBBBf/aXq8VpDOPincgSnHhrzqIqiQ==; 5:Cql2wnByjcfCTOZOQ2JnGy/EtQZEznrLxpX/RvyGAmpvcdUpZvFjjS1gBM4I0iEyxoOMZZILl4iGZz1no41+jnEfshve+bx3KYwJBqSvbhQoWLrxNcNjCE6mT0sIWgDNRGWA9zsWXoJp8or9vITOSg==; 24:XSNkLCH10imaS1krjdxs8bNwZivJ0VDCEaaTcZE1cpoTCV0Bd6tJ9xQEQ7kCISa/lcgArlGShcPVvXJ2N+Wey97Oksgi7Z4YNUyPI6Lsb2U= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DB6PR0501MB2455; 7:DTCZjjN/3B2B++ee0sKSP6gyTzyIS67ptFoTLK1ST2CsOCzCcoer1VOQ3DoYE13kUfQ0q7Mt7VUTuklhZn7gsl+YNkqtREufEaRBM4G0XYjTtstvKxqiYwPn0C8QhLpshpKkPWrOUmjeVRqbS0GYsXM7iLqKSNJesl1bUkf3f53dC4NToTDA0demmLTklHa8yyrNOhy0+lVi363mHTB4zMzJPVznekSkPz8SYHxeGP3cWvT/jKKR1wGiGj3F3/WzytVCmyAcnYJGaaLTnUgKS0bUOTi3LJxnBf+CW/YcYPBFU2daNlXCoRbtLCwAMgWn4vOKUSakpPrr3zF3EfZw783Fx4YS8TANhTnagwxl2jTSiL2efq3ITfrb9OCPOLbmUcQIJILp/V60erba8OeRIG+D7IlRfSaafkT8JRP6NuwRblIWGeQXyY58f7YYG1+jKlmu0F96siHq9Gue10rDkg== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jan 2017 00:49:44.8920 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0501MB2455 Subject: [dpdk-dev] [PATCH v3] net/mlx5: add support for ConnectX-5 NICs 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: Fri, 06 Jan 2017 00:49:47 -0000 Add PCI device ID for ConnectX-5 and enable multi-packet send for PF and VF along with changing documentation and release note. Signed-off-by: Yongseok Koh --- ConnectX-5 is a newly announced NIC of Mellanox. This patch includes basic enablement of ConnectX-5 as well as documentation. config/common_base | 2 +- doc/guides/nics/mlx5.rst | 34 +++++++++++++++------------ doc/guides/rel_notes/release_17_02.rst | 5 ++++ drivers/net/mlx5/mlx5.c | 42 ++++++++++++++++++++++++++++++---- drivers/net/mlx5/mlx5.h | 4 ++++ drivers/net/mlx5/mlx5_ethdev.c | 7 ++---- drivers/net/mlx5/mlx5_txq.c | 2 +- 7 files changed, 70 insertions(+), 26 deletions(-) diff --git a/config/common_base b/config/common_base index faee944c8..bb7beacf6 100644 --- a/config/common_base +++ b/config/common_base @@ -204,7 +204,7 @@ CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE=8 CONFIG_RTE_LIBRTE_MLX4_SOFT_COUNTERS=1 # -# Compile burst-oriented Mellanox ConnectX-4 (MLX5) PMD +# Compile burst-oriented Mellanox ConnectX-4 & ConnectX-5 (MLX5) PMD # CONFIG_RTE_LIBRTE_MLX5_PMD=n CONFIG_RTE_LIBRTE_MLX5_DEBUG=n diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst index 98d134190..a41c4327c 100644 --- a/doc/guides/nics/mlx5.rst +++ b/doc/guides/nics/mlx5.rst @@ -30,10 +30,10 @@ MLX5 poll mode driver ===================== -The MLX5 poll mode driver library (**librte_pmd_mlx5**) provides support for -**Mellanox ConnectX-4** and **Mellanox ConnectX-4 Lx** families of -10/25/40/50/100 Gb/s adapters as well as their virtual functions (VF) in -SR-IOV context. +The MLX5 poll mode driver library (**librte_pmd_mlx5**) provides support +for **Mellanox ConnectX-4**, **Mellanox ConnectX-4 Lx** and **Mellanox +ConnectX-5** families of 10/25/40/50/100 Gb/s adapters as well as their +virtual functions (VF) in SR-IOV context. Information and documentation about these adapters can be found on the `Mellanox website `__. Help is also provided by the @@ -185,8 +185,8 @@ Run-time configuration save PCI bandwidth and improve performance at the cost of a slightly higher CPU usage. - It is currently only supported on the ConnectX-4 Lx family of adapters. - Enabled by default. + It is currently only supported on the ConnectX-4 Lx and ConnectX-5 + families of adapters. Enabled by default. Prerequisites ------------- @@ -207,8 +207,8 @@ DPDK and must be installed separately: - **libmlx5** - Low-level user space driver library for Mellanox ConnectX-4 devices, - it is automatically loaded by libibverbs. + Low-level user space driver library for Mellanox ConnectX-4/ConnectX-5 + devices, it is automatically loaded by libibverbs. This library basically implements send/receive calls to the hardware queues. @@ -222,14 +222,15 @@ DPDK and must be installed separately: Unlike most other PMDs, these modules must remain loaded and bound to their devices: - - mlx5_core: hardware driver managing Mellanox ConnectX-4 devices and - related Ethernet kernel network devices. + - mlx5_core: hardware driver managing Mellanox ConnectX-4/ConnectX-5 + devices and related Ethernet kernel network devices. - mlx5_ib: InifiniBand device driver. - ib_uverbs: user space driver for Verbs (entry point for libibverbs). - **Firmware update** - Mellanox OFED releases include firmware updates for ConnectX-4 adapters. + Mellanox OFED releases include firmware updates for ConnectX-4/ConnectX-5 + adapters. Because each release provides new features, these updates must be applied to match the kernel modules and libraries they come with. @@ -241,12 +242,17 @@ DPDK and must be installed separately: Currently supported by DPDK: -- Mellanox OFED **3.4-1.0.0.0**. +- Mellanox OFED version: + + - ConnectX-4: **3.4-1.0.0.0** + - ConnectX-4 Lx: **3.4-1.0.0.0** + - ConnectX-5: **4.0-0.0.8.1** - firmware version: - ConnectX-4: **12.17.1010** - ConnectX-4 Lx: **14.17.1010** + - ConnectX-5: **16.18.0296** Getting Mellanox OFED ~~~~~~~~~~~~~~~~~~~~~ @@ -288,8 +294,8 @@ behavior as librte_pmd_mlx4: Usage example ------------- -This section demonstrates how to launch **testpmd** with Mellanox ConnectX-4 -devices managed by librte_pmd_mlx5. +This section demonstrates how to launch **testpmd** with Mellanox +ConnectX-4/ConnectX-5 devices managed by librte_pmd_mlx5. #. Load the kernel modules: diff --git a/doc/guides/rel_notes/release_17_02.rst b/doc/guides/rel_notes/release_17_02.rst index 699487dfe..5762d3f51 100644 --- a/doc/guides/rel_notes/release_17_02.rst +++ b/doc/guides/rel_notes/release_17_02.rst @@ -61,6 +61,11 @@ New Features A new network PMD which supports Solarflare SFN7xxx and SFN8xxx family of 10/40 Gbps adapters has been added. +* **Added support for Mellanox ConnectX-5 adapters (mlx5).** + + Support for Mellanox ConnectX-5 family of 10/25/40/50/100 Gbps adapters + has been added to the existing mlx5 PMD. + Resolved Issues --------------- diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index b97b6d16a..6293c1fda 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -286,7 +286,7 @@ mlx5_args_check(const char *key, const char *val, void *opaque) } else if (strcmp(MLX5_TXQS_MIN_INLINE, key) == 0) { priv->txqs_inline = tmp; } else if (strcmp(MLX5_TXQ_MPW_EN, key) == 0) { - priv->mps = !!tmp; + priv->mps &= !!tmp; /* Enable MPW only if HW supports */ } else { WARN("%s: unknown parameter", key); return -EINVAL; @@ -408,10 +408,26 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) sriov = ((pci_dev->id.device_id == PCI_DEVICE_ID_MELLANOX_CONNECTX4VF) || (pci_dev->id.device_id == - PCI_DEVICE_ID_MELLANOX_CONNECTX4LXVF)); - /* Multi-packet send is only supported by ConnectX-4 Lx PF. */ - mps = (pci_dev->id.device_id == - PCI_DEVICE_ID_MELLANOX_CONNECTX4LX); + PCI_DEVICE_ID_MELLANOX_CONNECTX4LXVF) || + (pci_dev->id.device_id == + PCI_DEVICE_ID_MELLANOX_CONNECTX5VF) || + (pci_dev->id.device_id == + PCI_DEVICE_ID_MELLANOX_CONNECTX5EXVF)); + /* + * Multi-packet send is supported by ConnectX-4 Lx PF as well + * as all ConnectX-5 devices. + */ + switch (pci_dev->id.device_id) { + case PCI_DEVICE_ID_MELLANOX_CONNECTX4LX: + case PCI_DEVICE_ID_MELLANOX_CONNECTX5: + case PCI_DEVICE_ID_MELLANOX_CONNECTX5VF: + case PCI_DEVICE_ID_MELLANOX_CONNECTX5EX: + case PCI_DEVICE_ID_MELLANOX_CONNECTX5EXVF: + mps = 1; + break; + default: + mps = 0; + } INFO("PCI information matches, using device \"%s\"" " (SR-IOV: %s, MPS: %s)", list[i]->name, @@ -719,6 +735,22 @@ static const struct rte_pci_id mlx5_pci_id_map[] = { PCI_DEVICE_ID_MELLANOX_CONNECTX4LXVF) }, { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX5) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX5VF) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX5EX) + }, + { + RTE_PCI_DEVICE(PCI_VENDOR_ID_MELLANOX, + PCI_DEVICE_ID_MELLANOX_CONNECTX5EXVF) + }, + { .vendor_id = 0 } }; diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index c415ce32c..ee62e044e 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -83,6 +83,10 @@ enum { PCI_DEVICE_ID_MELLANOX_CONNECTX4VF = 0x1014, PCI_DEVICE_ID_MELLANOX_CONNECTX4LX = 0x1015, PCI_DEVICE_ID_MELLANOX_CONNECTX4LXVF = 0x1016, + PCI_DEVICE_ID_MELLANOX_CONNECTX5 = 0x1017, + PCI_DEVICE_ID_MELLANOX_CONNECTX5VF = 0x1018, + PCI_DEVICE_ID_MELLANOX_CONNECTX5EX = 0x1019, + PCI_DEVICE_ID_MELLANOX_CONNECTX5EXVF = 0x101a, }; struct priv { diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index 65228d5f9..fbb1b6566 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -1517,14 +1517,11 @@ void priv_select_tx_function(struct priv *priv) { priv->dev->tx_pkt_burst = mlx5_tx_burst; - /* Display warning for unsupported configurations. */ - if (priv->sriov && priv->mps) - WARN("multi-packet send WQE cannot be used on a SR-IOV setup"); /* Select appropriate TX function. */ - if ((priv->sriov == 0) && priv->mps && priv->txq_inline) { + if (priv->mps && priv->txq_inline) { priv->dev->tx_pkt_burst = mlx5_tx_burst_mpw_inline; DEBUG("selected MPW inline TX function"); - } else if ((priv->sriov == 0) && priv->mps) { + } else if (priv->mps) { priv->dev->tx_pkt_burst = mlx5_tx_burst_mpw; DEBUG("selected MPW TX function"); } diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index 053665d55..4f36402eb 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -412,7 +412,7 @@ txq_ctrl_setup(struct rte_eth_dev *dev, struct txq_ctrl *txq_ctrl, .obj = tmpl.qp, /* Enable multi-packet send if supported. */ .family_flags = - ((priv->mps && !priv->sriov) ? + (priv->mps ? IBV_EXP_QP_BURST_CREATE_ENABLE_MULTI_PACKET_SEND_WR : 0), }; -- 2.11.0