From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0083.outbound.protection.outlook.com [104.47.1.83]) by dpdk.org (Postfix) with ESMTP id 17276F612 for ; Thu, 5 Jan 2017 12:53:12 +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=o9kjL2dDoODX75n+BOs0XEsHFM7PHlwH1rz1VXAZYOc=; b=rJ5lVkuH7HdkkadwXMW0Z0ndnZCSd7k8E9x1SFMonM6sJ7WyR9BtNK1+isT/RuTt4BqJW66905XkOv0aw8JPObChZtOTl3S76xogSnNG8Ru7kS0woUr6N7/SGfJRc1R7/F04Rgd5gv8y7oTst/56BWSuh0o/beFPpfpelpgOX50= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=yskoh@mellanox.com; Received: from mellanox.com (12.250.235.110) by VI1PR0501MB2464.eurprd05.prod.outlook.com (10.168.136.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.817.10; Thu, 5 Jan 2017 11:53:09 +0000 From: Yongseok Koh To: CC: , , Yongseok Koh Date: Thu, 5 Jan 2017 03:52:54 -0800 Message-ID: <20170105115254.27401-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: CY4PR1201CA0011.namprd12.prod.outlook.com (10.172.75.21) To VI1PR0501MB2464.eurprd05.prod.outlook.com (10.168.136.15) X-MS-Office365-Filtering-Correlation-Id: 59f063ee-c974-4f59-9627-08d435616c09 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:VI1PR0501MB2464; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2464; 3:euq7smtUKZTsxNVB7QYhxFGHB6sl5SyMfTEl9e6siX2Vg6MNQjYUG9OLAz75QBJGF2loGoXWhniBiNeRR4K5s6Hpi8Ym06D2+r+z77fHHFqo6jZaJO5YlnLtULFduQdcVVZVawM23GkR0la7J4XYQQk8W4A2CgGJVwhEhiUqF5yUA1KsLpESsQIXHO96yPus8e+AjKuqghFOLCu0Q+drpJcDPgJPUk9xF5/2bs1O2SzzGmlsXnb0VU2hrNr7R0MVte+durT3Q35ROPVt7y7syQ==; 25:PWWcYwjj7zjhDXWQFo9PytcL28BxbqD2xk3RgeR3tbdwSp2S42fNq7xGiuRVZPQZcBMqP6Sdml+oxEBbbGsyhU0uvzC1O+MdEWKxr6EHW5sehY0f9svZ8Px4BTtmclGa15W0DdQVTAsUWOUXsrU+HpColsNq9IYSZyKYRol9sGWRYR3la0lc+KdVOs5gJqL4ZykrZJucjcuNIrowM3hTub3gQeZ+kUbHp4hixOikTS0VYUVg2xQ5xAs+aDuzd1ChYs3sshjwhI1OSklwtnfsFEGwpYAOWj3ypJzfbRcLPij8BWETVr+HXkTI8+qBvZovcQMetUITLbNgYhd1HXZncSJJ4cXr9Qgx0TKTQz595GQclUuI4SlFPbs7vIwVRgIjY9mY5QT/6L+dVxfrtC9awg0lwfj/VFQ62A4eSEKQ614Wo+DMmtvzmkOZ7lLtwMQ/NmBGqOABrP4SxlBtkQz7Kw== X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2464; 31:/g8+CxYIXsWU4t5CtitfuD/sTVrIsLTXgHQgd06ymNbGbYR3jZG8VEtzdMuA+F4m/+knT/l1hiAvu372EYZ5uCT0TZBdtc6Hm8KXp6PG2qlL5ZcaqfcQTQmeAhOoFmCtUGTw+tTJxSGdzIqH1cMej2nOad9mIMsuXKSdKKRx4LHPUkTmFUYBMeQymHxdOx/AlnFgiC+/p7Oe3l3OY0n33fDUUNJEP3Qt4ZLIfZhMtfOZeiof5lyET1wXvyyRo+boHqgH6EbXkSWUMo08ACQRIA==; 20:MM+scT+DJxNz9OFKzVnR3suB4jEyOG/jlPeGY+7E4f5XFxDdCZwKqDu3D2Ug4Be+P7Ake+uCI9DcEnBmdBoejHoFi+UqA2FWPp3NrYEHf4ZEWNrOcMXhggr9FBQ1W7jqN4Gwx9vqrDtB0wQB7NPKeE7zQoUtkPFFGYSsf1nborXE32gQfOj+44QvTcbPNFGlZyITcQomO9ysBknH0i4X7pYZvX8nFmxn4EQvH2vXCFKVFEP8vqiRujdawxnIJhXQrqMa+foHuOAUO4LhQSrqBko/7S5LWMw17y2q4zZEaX/uuBsyX2WlGnn0a64VRuN5N6ZuJ0qGhFVdwashE+ucUHRSepS3Mdbjv/1RF75u9bLwXv7wp7RHPlP1lg3Z9FWT4Yl5F+frP1dYGVdIdqNpfoUrYWstgA9bfe07mL1HKikSN8noIBBfEsD+hA0djVfujAUA2+0gfO0WFzozAMbygILJdPo77bP2DivPBmvOZDwt/yqdXMO1Fl4gYq5M9V0S 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)(20161123560025)(20161123562025)(20161123555025)(20161123564025)(6072148); SRVR:VI1PR0501MB2464; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0501MB2464; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2464; 4:kiUnaDj1gugNkIXKrPHkd1qbM/SqmWB4aaOPAcNBg3LsodbgL8JnuJqcunsTSWYIe1Aq/UDUvcgqK8CiekmnoeA1CldTXztQnkL7/JQG2q2+g+Y+dfhEaVM+3Adty5O2jyx+PLGbQs7v/xzrbbconyRmaif0v+GRvVTPjeladkLLX46YwwuHWbzR++SSBBwmBEeu65V0S/xK35AmGc3cl5g4Y8Fzah2l1oLpMmZu61XD1/bxj/1PIr3CIdzdFgTBsrhfoi4+hn6Ng8CO1BJmNgOC3XTNLCisFCbv+VC37P1xG1f3moK2C1FB9nzfcBYwJVpn0ak8VhKTFi13upT5c/WSfeO6CLb0C5cGfz8o+TZygZebfqXtfXodyGdWrL+my4j5hZLBMzCR3LpkVbE4BNv3MDKEAWbWcUCA74IsNMi8VNrwfDDH22hmHZyuc1ZEq3pxTSA+3YrT6Ly8gA36B8CMjILVySwrkhOjNyDZFYgxyjvJzB5o2h/geptYipk5Sg4ASBHPFAG560x+3o2r23+OSOZa5tnwnhIwvR3bAUuaO3C3UbFNHIb1lx8v1dgspttCJaNLi5KJqbJju6t1mGUTiN9JnA4MOz3PZLa2chOHFHD3h1NVzZcEbY4z+qKm3Vt//XfiJ7IdLHD7X+j2Kw== X-Forefront-PRVS: 0178184651 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(7916002)(39450400003)(39840400002)(39860400002)(39850400002)(39410400002)(189002)(199003)(6306002)(69596002)(4326007)(8676002)(5660300001)(4001430100002)(6666003)(50466002)(81166006)(81156014)(48376002)(105586002)(1076002)(6116002)(66066001)(36756003)(50226002)(575784001)(5003940100001)(86362001)(6916009)(3846002)(101416001)(107886002)(25786008)(106356001)(42186005)(2351001)(21086003)(92566002)(2950100002)(33026002)(47776003)(110136003)(305945005)(2906002)(38730400001)(68736007)(97736004)(7736002)(54906002)(76176999)(55016002)(50986999)(189998001)(33646002)(309714004)(19627235001); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR0501MB2464; 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; VI1PR0501MB2464; 23:F4htLDf9ZmJJdeHzaP7fVaihORwYd0y4EMIAWB+?= =?us-ascii?Q?UM0cFwhbTvmeUvU+0FxXjgCaEfgH3A6zt6R+4bCxKVQFpeJ6S9wssmOi4AhM?= =?us-ascii?Q?T0JxNoD2tUb56ycVQkPAIgDxTgN6QF6NXGC4bQv71c5JLJEiQOL6ksxW1o1B?= =?us-ascii?Q?YEHhqCWBBciGp/Ya56p/vUIJRa8XBS+84fIWAgfIjSWih7r8aPs6RvJiuEhV?= =?us-ascii?Q?zc4PUluGtW7fxNEcsQnOH70pGDUV4oXkny+3iUMq3yXS5zWvxe+v8L2EUygk?= =?us-ascii?Q?mLsY+PoHe5riYNwZeX8a+3na/qdxvzPIQcpDdZY18NBwXiMc8g19aIgKSbcx?= =?us-ascii?Q?X4xaYiqqKAuiK2Rd6Db5HI39PyXwkU78FCHf9aU0vMdQzz0NSUo+kXb6N3mb?= =?us-ascii?Q?TmkFMsXfLw1Sowi9fN5GcuM7G8v4mGsCbxEnCNPKTzMYqaoxnu/+vr2U/dmB?= =?us-ascii?Q?eReN1FDDWFAQ8RfH5fll1if7ooZABv7RIQE1xMck4d0QwhZwbxtud83serda?= =?us-ascii?Q?bP5pr4bafY5tj32+kBq27G12fvQgKohNwAJLFblOH18PcmYZ7Oai2ITfTdK/?= =?us-ascii?Q?a4Ummiqfe7RGcD4XiAVSE94syaE5jg9iox28scxMGF17HTRe8PcqVF3SA0bY?= =?us-ascii?Q?h0CsNyStYowSRM37jxz4o/84F+EYhzGHIaHRP+1wKj7BYIOLrdmldCtui638?= =?us-ascii?Q?Yc5D1tI0FCwL6t5TWdeHA88DQ11lYyRg1TL+R0OX8oiPccIsxHntj07OjLnx?= =?us-ascii?Q?iuvwIY73TmSw1VDCVB2RiU15Few3YULZN+wvIyTy/8QiWYbHlrY16VrlxOB1?= =?us-ascii?Q?93yHNIy4uThDRTUtXB6aEwlwl4rmeft01XhoSShilEBOKKrV+suO73D3cORW?= =?us-ascii?Q?lLJtFs0GfzwxJ+6NBC41l4RHoi7DrEA3VmCimiTMyr1N7KhaEun1bHLKaOnH?= =?us-ascii?Q?sMrECvz9HAfdqkw0/yI/Bid6zYvQyGkE1B64sxMSRUiSzQq3chGa1OUQS8fk?= =?us-ascii?Q?P8lvXgq2fOwWaU83xtR0lbVukuEQPi6dWaqaRFdAWXHwPqirqsfwckwjKy+P?= =?us-ascii?Q?HQWJY6vfrmH9o5N/nHNc54gYijcYCrVXSuM8cTiy1/+HAxksqicUZOpeRv8M?= =?us-ascii?Q?enB40KJPO5zJ/g3KXEr869sX9mqVdqqBSB+pchTvfw1fNAgEJwGzyUEQ5jnN?= =?us-ascii?Q?ofhx9BhTWQ8RBRHw+GWEm6rWsy/NMRw3uVJ6lvjvyYMP+RK0AIzlZGB0a9Sv?= =?us-ascii?Q?CFP85lpuR82yLeL7yU3zCUSzb8YC4CQ/T4fIxwLfJJBVon4sn8/u4J989P5M?= =?us-ascii?Q?fDpjRID3rpPL/t/urb0XDEQW628bhoZgTLsUndqZtS61OxHnBmtfu5Ehak93?= =?us-ascii?Q?vUINYMqXaBXu5tDDOQ/NjfMFtTnj/A+/LX0NCLuSfnzIpdPZ1YszlzWkQZES?= =?us-ascii?Q?HiV2CX2hjDg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2464; 6:DBML6gEkEt2t2jik2zh2EBydVTHoMi1hhP1r+V5A3iupVQwWGpbEvtpSrvrsn+U/LXyUEfDZ2cJemZfoE6Mewxer292VAL9PaTO6i0Q2fHvVZnT4PDlPNvlx768QYVL8fle8w/xckDPyqm+a922PWmlfmGL2bME1s1/X0bWaYBat+RUgJUmjxnWX909PaN0CqJtsu+PAo1u1JP4XyotBY2hEf9w+tCsjbyOPLEv9kImSPCOuEw0QISIlZLrtbp+/628CYVW8KW88P2H/zDVxeZevcmKPxbzGvjFmtdmlNXwzELFGnweimSA24CwSAGl/tyrouE5Vp58hFh9df7upYG5qH2ebzHVgp0ADBZ9N2e7889GlPYcpX6jxQs04MFR+TiZDFEDDmhZiN2Vh7QDad/oBk6DEJekva54sS4pQcKAFdxMSl9ZjKxp1CKfimRqBsj21jx3x000fYfXamWZzvg==; 5:K9SAsSXpSmkdQNnn/q28lH10jdpfKDULutUjr5oU0LvhWKRcpgFyaBvmD/YlTBW+zfLInp3XHsTZ+Mqp8zBV1x6ioOmhYXYTnwBf2w8pg0u9BoUem4/v8jiirD6VOSdQLAY8cgi8KpKz2TGhFtsLiA==; 24:J7nQg4hsaWisLvSXnGWtX6vEd98UFgIpWdvoENuZIwYD1mq0Axi10WMb3cvpjPN00LgG+Ql4JK3ht9pRP9QTQIqnddckGV8p17YOPZAVLak= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; VI1PR0501MB2464; 7:OOcIGRtMKVcjhX12yFYcRLtonBFgl/4BPEfP2GNQxGqxJL1zRnVVuHjwfFjT7X7BHAICeD5rJgxfK89TdQwanavjEEC3BHrS4u0uwIo4bgDsWtVFwGm9iEHtDd3rZu9eYUC4OFj2GW64g+tBnFyy+xxWcgwyv9NRnCaSd3DKcToZFWhK8bNuk4nXyXvFoVg+W0iGbJxs9IpD+XdQ3nF5W/7Zp1AfOwz2hYaN1b6lYMqBGFMhxbr9ypC8RFIhbm+b1qwuR9TwCNBhhX2ugxGVfdgEa4EK/rIS4sYbl9PoeBV1qj3wXRE5mYGaUMcE0Vx4/LWqefs8Wolcepk1GH6xif7EZWQlp4e+IcxBlwQnLESgUhT3Ih4geT5niDXaocKhjmwrlBX8aj4TNrY5mJO/Pn6Ae0e6+CgAnXFYD4k56We73UG7UpwFCjJOzcypdq3WJ0Q8jjKNgMojSgKt0JACEA== X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jan 2017 11:53:09.5200 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0501MB2464 Subject: [dpdk-dev] [PATCH v2] 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: Thu, 05 Jan 2017 11:53:12 -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 | 37 +++++++++++++++++------------- 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, 71 insertions(+), 28 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..514232bc8 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,16 @@ 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** or higher + - ConnectX-4 Lx: **3.4-1.0.0.0** or higher + - ConnectX-5: **4.0-0.0.8.1** or higher - firmware version: - - ConnectX-4: **12.17.1010** - - ConnectX-4 Lx: **14.17.1010** + - ConnectX-4: **12.17.1010** or higher + - ConnectX-4 Lx: **14.17.1010** or higher + - ConnectX-5: **16.18.0296** or higher Getting Mellanox OFED ~~~~~~~~~~~~~~~~~~~~~ @@ -288,8 +293,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..6da4d0f8d 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 adpaters (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