From patchwork Wed Jun 27 18:08:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Mazarguil X-Patchwork-Id: 41721 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 4E3561C2A9; Wed, 27 Jun 2018 20:08:27 +0200 (CEST) Received: from mail-wr0-f172.google.com (mail-wr0-f172.google.com [209.85.128.172]) by dpdk.org (Postfix) with ESMTP id 8DDCC1C2A7 for ; Wed, 27 Jun 2018 20:08:25 +0200 (CEST) Received: by mail-wr0-f172.google.com with SMTP id c13-v6so2946045wrq.2 for ; Wed, 27 Jun 2018 11:08:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition; bh=puY4aPP3Ke/rMrI5Dlv/O6ryYmPHYQNbtp9/MC+/tPc=; b=EjaY8OQxcNAGpLdj2ZJ8kz5kS5jpnnwAugjg3KSdPLUQ1jZEMQgF8UjNTOJ8iQzTFN EEIAxp7FhX75mfECWs7FHD14MYIVxJ5Ber8aPx+TFuvHEGHIniPhxiKCw1W6sMw3UEuR DNvWPK5sBxIz5/inJ859wL6RSzx3oQgdi+FxYI6ejQh/RCB3Iwmb1ZSjoxGWlVOZic0D 2IuZHC5CEZ1JVEBDjEShYAoFRRUTqNEkB/sz+ZkITrR/8cg4BRTpblm+2LGD0+a1N5Vq 2o9nYykXbK05c5dkFxBLUedrQFlT1L7QJsLftGnW/9CH20ptfXsxuUjY9G2uN0/w0tkb l+Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=puY4aPP3Ke/rMrI5Dlv/O6ryYmPHYQNbtp9/MC+/tPc=; b=btJ+4ov3F59X/B9DM3QYlzjuqSCXPsXI3CRLYT5ChuYbE4S8HGqVElRI/Yf9XsjtH0 CJrRNUGTAXKcKe7ne76NMSdOtU+2YVtCNB5pEggO+3GkQKr53txBKKx6nVCODxOulisl PLmH+RkYOUIrXlsMUpdV8N0xtXPaePXKJ1Rh4C9gh3pBTWUv7eftq7qSuICNJx/HCWfl eekPPQr7P9OwPJuDWJ7YWkSPI0L+3w1XTASzevoFxyYVkOuwP+l/NrL4VTU1Fzn1pjQm 1kkvhrZ6gKv7+UFGeDoh/kQ0j5aKqitAjCucO/h93+lbLm8zLhT9RAsD00RYtou0/lcw s4Lw== X-Gm-Message-State: APt69E3hWhW9dVq9Kz2f8Enr0td7CQLdF0+dtZt32g9y+moT/ZfKsCUv 0wCWMSpFqFt8lQqW4FnyhxAE6A== X-Google-Smtp-Source: AAOMgpeFlfo35X6D3dEBo+C+PLhuQ8QGGLyw/fmtKfODyRYslFkv6s25+3rXdV1PZAi9cKk0SwYxLQ== X-Received: by 2002:adf:9736:: with SMTP id r51-v6mr5893250wrb.5.1530122905305; Wed, 27 Jun 2018 11:08:25 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id v19-v6sm3684645wmc.9.2018.06.27.11.08.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jun 2018 11:08:24 -0700 (PDT) Date: Wed, 27 Jun 2018 20:08:08 +0200 From: Adrien Mazarguil To: Shahaf Shuler Cc: Nelio Laranjeiro , Yongseok Koh , dev@dpdk.org Message-ID: <20180627173355.4718-1-adrien.mazarguil@6wind.com> MIME-Version: 1.0 Content-Disposition: inline X-Mailer: git-send-email 2.11.0 Subject: [dpdk-dev] [PATCH 0/6] net/mlx5: add support for switch flow rules 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" This series adds support for switch flow rules, that is, rte_flow rules applied to mlx5 devices at the switch level. It allows applications to offload traffic redirection between DPDK ports in hardware, while optionally modifying it (e.g. performing encap/decap). For this to work, involved DPDK ports must be part of the same switch domain, as is the case with port representors, and the transfer attribute must be requested on flow rules. Also since the mlx5 switch is controlled through Netlink instead of Verbs, and given how tedious formatting Netlink messages is, a new dependency is added to mlx5: libmnl. See relevant patch. This series depends on Nelio's mlx5 flow engine rework ("net/mlx5: flow rework" [1][2]) which must be applied first. [1] https://patches.dpdk.org/project/dpdk/list/?series=268 [2] https://mails.dpdk.org/archives/dev/2018-June/105499.html Adrien Mazarguil (6): net/mlx5: lay groundwork for switch offloads net/mlx5: add framework for switch flow rules net/mlx5: add fate actions to switch flow rules net/mlx5: add L2-L4 pattern items to switch flow rules net/mlx5: add VLAN item and actions to switch flow rules net/mlx5: add port ID pattern item to switch flow rules drivers/net/mlx5/Makefile | 2 + drivers/net/mlx5/mlx5.c | 32 + drivers/net/mlx5/mlx5.h | 28 + drivers/net/mlx5/mlx5_flow.c | 113 ++++ drivers/net/mlx5/mlx5_nl_flow.c | 1126 ++++++++++++++++++++++++++++++++++ mk/rte.app.mk | 2 +- 6 files changed, 1302 insertions(+), 1 deletion(-) create mode 100644 drivers/net/mlx5/mlx5_nl_flow.c Acked-by: Nelio Laranjeiro