From patchwork Wed Sep 25 07:53:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Slava Ovsiienko X-Patchwork-Id: 59697 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5D683B62; Wed, 25 Sep 2019 09:53:47 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 838912AB for ; Wed, 25 Sep 2019 09:53:45 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from viacheslavo@mellanox.com) with ESMTPS (AES256-SHA encrypted); 25 Sep 2019 10:53:44 +0300 Received: from pegasus12.mtr.labs.mlnx (pegasus12.mtr.labs.mlnx [10.210.17.40]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id x8P7riMN030174; Wed, 25 Sep 2019 10:53:44 +0300 Received: from pegasus12.mtr.labs.mlnx (localhost [127.0.0.1]) by pegasus12.mtr.labs.mlnx (8.14.7/8.14.7) with ESMTP id x8P7riVB006849; Wed, 25 Sep 2019 07:53:44 GMT Received: (from viacheslavo@localhost) by pegasus12.mtr.labs.mlnx (8.14.7/8.14.7/Submit) id x8P7riGS006848; Wed, 25 Sep 2019 07:53:44 GMT X-Authentication-Warning: pegasus12.mtr.labs.mlnx: viacheslavo set sender to viacheslavo@mellanox.com using -f From: Viacheslav Ovsiienko To: dev@dpdk.org Cc: matan@mellanox.com, rasland@mellanox.com Date: Wed, 25 Sep 2019 07:53:23 +0000 Message-Id: <1569398015-6027-1-git-send-email-viacheslavo@mellanox.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dpdk-dev] [PATCH 00/12] net/mlx5: add bonding configuration support 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Multiport Mellanox NICs may support the bonding configurations internally. Let's suppose there is ConnectX-5 NIC with two physical ports, on the host it presents two PCI physical functions: - PF0, say with PCI address 0000:82:00.0 and net interface ens1f0 - PF1, say with PCI address 0000:82:00.1 and net interface ens1f1 Also, let's suppose SR-IOV feature is enabled, swithdev mode is engaged, and there is some set virtual PCI functions and their representor interfaces. The physical interfaces may be combined into single bond interface, supported by NIC HW/FW means directly with standard script: modprobe bonding miimon=100 mode=4 # 100 ms link check interval, mode - LACP ip link set ens3f0 master bond0 ip link set ens3f0 master bond1 The dedicated Infiniband devices for single ports is destroyed, the new multiport Infiniband device is created for bond interface and all representors for both PFs. The unified E-Switch is created either, and all representor ports belong to the same unified switch domain. To use the created bond interface with DPDK application both slave PCI devices must be specified (in whitelist, if any): -w 82:00.0,representor=[0-4] -w 82:00.1,representor=[0-7] Representor enumerations follows the VF enumerations in the same way as for single device. The two PCI devices will be probed, but eth ports for only one master device and for all representors will be created. This ports may reference to different rte_pci_dev but share the same switch domain ID. The extra devargs specifying configurations must be compatible (otherwise error on probing will be arisen). For example, it is not allowed to specify different values of dv_flow_en parameter for different PCI devices. Signed-off-by: Viacheslav Ovsiienko Viacheslav Ovsiienko (12): net/mlx5: move backing PCI device to private context net/mlx5: update PCI address retrieving routine net/mlx5: allocate device list explicitly net/mlx5: add VF LAG mode bonding device recognition net/mlx5: generate bonding device name net/mlx5: check the kernel support for VF LAG bonding net/mlx5: query vport index match mode and parameters net/mlx5: elaborate E-Switch port parameters query net/mlx5: update source and destination vport translations net/mlx5: extend switch domain searching range net/mlx5: update switch port ID in bonding configuration net/mlx5: check sibling device configurations mismatch drivers/net/mlx5/Makefile | 5 + drivers/net/mlx5/meson.build | 2 + drivers/net/mlx5/mlx5.c | 359 +++++++++++++++++++++++++++++++++++++--- drivers/net/mlx5/mlx5.h | 23 ++- drivers/net/mlx5/mlx5_defs.h | 4 + drivers/net/mlx5/mlx5_ethdev.c | 128 +++++++------- drivers/net/mlx5/mlx5_flow_dv.c | 98 +++++++---- drivers/net/mlx5/mlx5_prm.h | 9 +- drivers/net/mlx5/mlx5_txq.c | 2 +- 9 files changed, 506 insertions(+), 124 deletions(-) Acked-by: Matan Azrad