dpdknicopenvswitch

Is there any patch for hardware LAG mode implementation in OVS-DPDK?


I want to implement LACP/LAG in my OVS-DPDK and offload it to hardware (hardware lag). But I don't find any related patches for the same, can you suggest me anything with which I can proceed with ?

Details: 1). OVS version: 2.13.0 2). DPDK version 19.11.0 3). OS "CentOS Linux 7" 4). Using virtual DPDK NIC 5). Trying to implement using lag PMD (new to this area and don't have much in-depth knowledge about these so searching for patches if any). 6). Running Lag on a switch which is created using OVS


Solution

  • [Edit-2] based on the update from comment "X722" but in dpdk I am using the ifc modules

    The PCIe NIC card in use Intel FPGA 100G VF, which is used virtio vDPA acceleration by DMA copy to virtio VF ports by skipping the need for a virtual switch like OVS-DPDK.

    The short answer there is no ready-made support for Hardware Lag orRTE_FLOW through IFC PMD

    the detailed answer is you can if you accomplish the following

    1. The RTE_FLOW with match action can be offloaded to NIC via enabling dpdk ovs build in compilation and run with other_config:hw-offload=true (as suggested by @stackinside). But this is not for LAG it is for exact match table offload to FPGA
    2. For Hardware LAG enablement, you will need to work with FPGA engineer to create HW LAG FPGA binary by programming LUT. Then expose this feature to OVS either by custom IOCTL call (via admin queue) to PF.
    3. Once step is done, then you can expose to DPDK via modifying IFCVF driver to support Hardware LAG.

    Note: this will break the actual HW function for DMA virtio RX-TX to something different. There is no patch in ovs-dpdk that can create a binary image for FPGA.

    Hence answer to your queries is

    [Question-1] I want to implement LACP/LAG in my OVS-DPDK and offload it to hardware (hardware lag) (described in the description)

    [Answer] there are 3 modes of LAG/LACP that can be done over OVS-DPDK

    1. via OVS-DPDK (software) logic
    2. via DPDK library (software)
    3. via OVS-DPDK Hardware offload (OVS-DPDK agnostic and OVS-DPDk aware)

    For OVS-DPDK Software logic I request you to check red hat ovs-dpdk configuration and verifying with show lacp 1 for lag-1 details.

    For DPDK library Lag (Software), please add DPDK-LAG interface with option --vdev 'net_bonding0,bond_opt0=..,bond opt1=..' as mentioned dpdk test lag url

    For HW offload LAG from

    1. Intel side the ASIC like FM10K, FM12K and Snow Ridge SoC has LAG, but has to be configured via SDK using IES API.
    2. Mellanox the embedded switch can create and maintain HW LAG, please refer to ovs and not DPDK-OVS LAG over BRIDGE-PHYSICAL
    3. similar is the case for Broadcom, Marvell and netrnome.

    But the HW LAG is not part of DPDK port or DPDK port representation. Hence the HW vendor or ASIC vendor will have custom calls via SDK.

    note: list IP FPGA firmware offered by Intel

    [Question-2] is to create bonds using OVS and integrate it with dpdk for lag implementation. (from comments)

    [Answer] I believe there are vendor-specific patches for OVS (and not ovs-dpdk) for Broadcom, Marvell, Mellanox and netrnome. In these model, there is a specific name for bridge that points to ASIC or embedded switch br-phy. You will get in touch with vendor or check vendor github pages to get access to patches for OVS. Hence steps will be

    1. Identify the ASIC in use
    2. find the patch for OVS from vendor or vendor github
    3. apply the patches and rebuild the for OVS-DPDK
    4. based on the patch use the right bridge to setup lag example br-phy that is bridge physcial

    Note: requested information for ASIC and vendor, since it is not shared it is difficult to lookup in Github.

    [EDIT-1] OVS-DPDK generally relies on RTE_FLOW for any hardware-based offload. The vendor or ASIC specific offload/patches are available for OVS/OVS-DPDK from the vendor by integrating ASIC SDK.

    @DeepakSahoo in comments I have shared the link DPDK NIC (also in the comments). Please try to identify the ASIC and use lshw -c net -businfo. If it is generic access either via RTE_FLOW or NIC specific DPDK API we can offload LAG to HW embedded switch. But if it is not present, you need access to SDK and Libraries for configuring the HW ASIC or embedded switch, then invoke those calls from OVS-DPDK code base. I have shared in the above comment how it is done by mellanox for OVS today. Hence there is no vendor or ASIC specific HW offload patches