From patchwork Tue Jul 30 11:05:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Hurley X-Patchwork-Id: 1138911 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=netronome.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="l33YydqZ"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 45yYnl4VlTz9s3Z for ; Tue, 30 Jul 2019 21:13:15 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id B4B1CAD1; Tue, 30 Jul 2019 11:13:11 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id C7C4F2A31 for ; Tue, 30 Jul 2019 11:06:06 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 22F8BD3 for ; Tue, 30 Jul 2019 11:06:06 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id n4so65363051wrs.3 for ; Tue, 30 Jul 2019 04:06:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=rCj/ctpYu1QaE0meGTc4lzhxz0IQ81Dm1lyLVtzETNM=; b=l33YydqZNuaH2vgspHnTg4FrmDrkllOPvYQ/Zo2SI03SfZzmubGx6tIsnS5G8HytPC /p9Tk8OZYrO9yvZE58y8NyLsSOnvmDGsajoo32s/ceZjimddy6+Ly/q1iBOlYVWvv7RD qCfATdQLfI2Q3JaeCqXcMv84DN25+tjvfnRwacnY81nQMMdaHGfDxyLcIxRzZwtFQLvT x18/ioddGEN2vhv42djQZAAeU9XS28Z9LpEsPEJh+JbES5Fh/bRXqOQZg6XTcJnx+arZ ksGa6b+YUvdCC8aHpn/IIzRVfGxMCDbcy6iqEUVlWw0XbN+LdDErlWgFfwGq0RZ+rDsq YemA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=rCj/ctpYu1QaE0meGTc4lzhxz0IQ81Dm1lyLVtzETNM=; b=o8R4cAcnQ9mo5KpisLkR8HFjs/4FNpOECXjVw+WiyURfayHCcyRTU2pilbh/5HGBE6 agOLu3ByKGTOmNCvLHJr9kWdMKLXUX39Pz3G80/wsi55IGSluNlVOclOAJFJIB1mR8EH 3Nx91gtXOHuGhtu9RGBw4s2vzgUNEkpYZ0VOQc7hf0katPKu52FuZyO72aqm9SVFolyw hk8y1Ax8EuzaS/cyX4X1kodKfhMIXvoK7nw+zIdeS9c8obOcLvWaiZgayge0ubb3PqOz 5ulZm0K3dmqyVRAylmyUDbcBegpAyZQX0ddV+7NMkD1x0PbMpSb6mTNd8hgD/FO28a4y 4wmw== X-Gm-Message-State: APjAAAVHHV8r4sFPwYO7zG8A5zOJfztrqnq/cWesOv9YWBYOFWH169Ko x2jOZGKhRu9PJzwvhq7Mx7nXWaGD8bE= X-Google-Smtp-Source: APXvYqx1ya2cIcr03DvQTXJ8K8XT9h+qh120YEcf7gtp+90HsYLFiMpRd4W0qSLv/fwGay3dXIKXuw== X-Received: by 2002:adf:f348:: with SMTP id e8mr26609365wrp.76.1564484764526; Tue, 30 Jul 2019 04:06:04 -0700 (PDT) Received: from jhurley-Precision-Tower-3420.netronome.com ([80.76.204.157]) by smtp.gmail.com with ESMTPSA id v16sm48958021wrn.28.2019.07.30.04.06.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 30 Jul 2019 04:06:03 -0700 (PDT) From: John Hurley To: dev@openvswitch.org Date: Tue, 30 Jul 2019 12:05:13 +0100 Message-Id: <1564484717-18648-1-git-send-email-john.hurley@netronome.com> X-Mailer: git-send-email 2.7.4 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: fbl@sysclose.org, oss-drivers@netronome.com, simon.horman@netronome.com Subject: [ovs-dev] [PATCH OvS 0/4] Offload MPLS actions to TC datapath X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Recent additions to TC in the Linux kernel includes an action module that allows MPLS packet manipulation. Update the OvS TC API to allow OvS datapath MPLS actions to be converted and offloaded to a TC datapath. Actions converted include set, push and pop. TC also offers a decrement TTL MPLS action, however, OvS handles this by matching on a TTL value and doing a set on the MPLS header to a TTL value one below. Therefore, this action is convered by 'set' offloads without having to be explicitly supported. John Hurley (4): compat: add compatibility headers for tc mpls action ovs-tc: offload MPLS pop actions to TC datapath ovs-tc: offload MPLS push actions to TC datapath ovs-tc: offload MPLS set actions to TC datapath acinclude.m4 | 7 ++ include/linux/automake.mk | 1 + include/linux/tc_act/tc_mpls.h | 37 +++++++++ lib/netdev-offload-tc.c | 71 ++++++++++++++++ lib/packets.h | 24 ++++++ lib/tc.c | 178 +++++++++++++++++++++++++++++++++++++++++ lib/tc.h | 11 +++ 7 files changed, 329 insertions(+) create mode 100644 include/linux/tc_act/tc_mpls.h