From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0056.outbound.protection.outlook.com [104.47.0.56]) by dpdk.org (Postfix) with ESMTP id 7FCB9239 for ; Sun, 7 Oct 2018 14:58:49 +0200 (CEST) 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:X-MS-Exchange-SenderADCheck; bh=0uWjNV1V3E8JOcgPeFNNlF8EZyEkkQqLhDQQQll94nM=; b=vk4UtVrwrCbyU7djSkIbuDlrL/88ozboDdePvs1cad7J4bWHGFedm2hdeE0zFVOGN6tz9OIa7XbqmNLua5DPwUNOAbnZ6jQc5nnKtI7+mdtSwpNWmKlhZFmxvB3oRyi1G9b05pTkPhcMKUyPtDZ6bJcB+NxX1s2BeapEyhQ3hbQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; Received: from mellanox.com (37.142.13.130) by HE1PR05MB3436.eurprd05.prod.outlook.com (2603:10a6:7:33::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1207.18; Sun, 7 Oct 2018 12:58:45 +0000 From: Ori Kam To: arybchenko@solarflare.com, ferruh.yigit@intel.com, stephen@networkplumber.org, adrien.mazarguil@6wind.com Cc: dev@dpdk.org, dekelp@mellanox.com, thomas@monjalon.net, nelio.laranjeiro@6wind.com, yskoh@mellanox.com, orika@mellanox.com, shahafs@mellanox.com Date: Sun, 7 Oct 2018 12:57:32 +0000 Message-Id: <1538917054-68283-2-git-send-email-orika@mellanox.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1538917054-68283-1-git-send-email-orika@mellanox.com> References: <1537995646-95260-1-git-send-email-orika@mellanox.com> <1538917054-68283-1-git-send-email-orika@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [37.142.13.130] X-ClientProxiedBy: LO2P265CA0119.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:c::35) To HE1PR05MB3436.eurprd05.prod.outlook.com (2603:10a6:7:33::26) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0931d852-55a2-4311-dd38-08d62c549ee6 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:HE1PR05MB3436; X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3436; 3:PXQrTydkzsBDE3FTUSetWgCce/W/TV++GeHRSKw8E2ijoNpqjmBPfQDU486owKQkDZima53Me7UwiwuVZMrjtIKGHJOLp3FaHEBdDYMnSBp1wShqlgzkMSUqsDaNqCGJuO82GRFypqDhBus3bzEHtF30R2BRSoTc+C9Caf9VNXGHZet4k/PT6BuZLEOQPQ7+7OUphd8oLpUBH50LQGAenn9nsTUT2pAaA4YdsLYO5NRvRFcbfOL3TVTW3/3/cV06; 25:MNqDwgXyZcUuMCiijvr2lxd2wz1C3SGovgTZsd3v+IhCWqK/nbUjyZVn7XPHmjXiTABUtzZb5rOgK4EEl4g/nhXSFXkAP/UrGZ8zzDi1awDjSco1e4zFn7mk1gT4Vd/c9UZsw1OV6jI22FQnGqeRVCeX/47oaMXg49D5W5XepfIBAvqCNPab0Avr1mQIPByM+8aVg1mlphAoy+rZ6hLUBM/Eofut8gvGFE16FbGYadoydLznc97m6U/VDQg/6VWeMabwLJjGiZGD4TV5rjAK16/4DEk9od562gg4dmpuJonO4rOtz0aE46IOac1btQVcgbOYXj6YscalUSzNqLjSRQ==; 31:JwFnUX1kplGwll7kvBDOqbgWfSsfu89H+2APUzYeYZ81ufK6RU11EJibYeJ/EIRC2bKAVHCqFicjj6zoi9hLUUx9KFXl+exHRUHpyqAY4/YnfHanZszaobFq9FrXkNaDEEeCEyyVGk8mWJNQiRnPJz7nBa3XmuoCR/BpopDokZGuY1KuFGRW8tigMgDykvIPKXzyhSRfDprDrGLDNn0nMR9iMHb+V/zsctCYeze63Xg= X-MS-TrafficTypeDiagnostic: HE1PR05MB3436: X-LD-Processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; HE1PR05MB3436; 20:OIYEuELtJKbN52GdLW5epV1zosuOeeQFqhZuN7bE4JvHAE5IJXlXdrFlqj7NBDyBNLvBG591ODga9Qm5g97Cjh2IJEw7tEAEyW/7vRMzjFxygtMgRTe4ko/3MwU5pKxmC1uNRb0BLqAUBC0X548Am1x1OBlVbpzb6WHnugwi7N/om6at9vF4fJUeGtZsVih31uO81dwdxHvKFBZYRM6bq9ZCXsFRUq2D48PxzbrgoPCMTn31GW6jsapKcaqM9fR+EukXYcrzDl8/S+n3IiWH/BRnw8yEFebCNft6cCdGFFt9plmIZvja13w6O7kpfVF6kaSKRT/QQpYAkTvGKr6B0vSsruUTXBpXsr+pbo5wXYofsL4cCx9s2ZgiLUrw3SWbzaOMoCW15gRF9Q6779uW9KDEpEN1u5XQwX3vrFjrUYNJNyTt5161my8Qf7j5XxEcqGkBoKbUWtHkZTLlJAg2qWdfwXFkdPqePwMCtlZvkYX6lxTO4caiUD98jlcEKvlo; 4:yn5sDzZRc8Pkj71cxUYaYerljyRM4QIKYMaNBzvrG6bu/8yYugepXHlKKZ5Nqa6HczzIVyUJT2f1hsWsw0Hg0pII+HkKTAB3Ww8rBNznRApkm0ByN4ucqXq109N5PApUsPdJZUC1xz9jSLjue/lrHw2A89QZb12GOGaFD6HA3ZNJ2QfTXN28IgOaL4u56mgsqtCd+vaIbwKhwwECupsC+V92RGVQH9GxGlZ/TdihTQx4l+/sSJYUvPGBYYnCWrDkqXKWxqrHxFglbLbsyZyAng== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(10201501046)(93006095)(93001095)(3002001)(3231355)(944501410)(52105095)(6055026)(149066)(150057)(6041310)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(20161123560045)(201708071742011)(7699051)(76991055); SRVR:HE1PR05MB3436; BCL:0; PCL:0; RULEID:; SRVR:HE1PR05MB3436; X-Forefront-PRVS: 0818724663 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(376002)(396003)(136003)(346002)(366004)(39860400002)(199004)(189003)(105586002)(76176011)(2616005)(3846002)(51416003)(7696005)(106356001)(52116002)(6116002)(386003)(55016002)(486006)(476003)(11346002)(446003)(956004)(26005)(86362001)(305945005)(21086003)(53936002)(316002)(36756003)(69596002)(16586007)(14444005)(16526019)(186003)(8936002)(81156014)(50226002)(4326008)(478600001)(2906002)(66066001)(8676002)(4720700003)(81166006)(7736002)(6666003)(25786009)(8886007)(50466002)(68736007)(48376002)(107886003)(97736004)(47776003)(33026002)(5660300001)(41533002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR05MB3436; H:mellanox.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; Received-SPF: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; HE1PR05MB3436; 23:82GxKiioI7TI9VIGQINti86TiMCHalS9cokX+2ztm?= =?us-ascii?Q?OsXJr+n3ZHnmW11aeqPzJNnLrwTLmfZgUvh68JBRC5v/2ynQv2QE0BpyUKWO?= =?us-ascii?Q?C4CTFzOtbRJXs/oip8astwgtcSkcILHY85KWaLmSzHqhJzp6muXM5kiG9hJ3?= =?us-ascii?Q?DklHImshPkrQaenTkZTkwA0ORxrl/vFVORKQZEBwjUqHs0ZqOIq1ntBlGXqa?= =?us-ascii?Q?wLvD7XuuOzG+1SE7e6eU0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6wPjFJZnP4cgG+rKEVdKLq7dJ9wGowGLiyUxqRTgoG8edq2FFeal3lKGwev1OeK01V9FMDW5pgw==; 5:geihIwqqCv0vjzMfBN16TIJJ9mweUtsrh/X1yC9jqfhaNh8Yo5n3pXxr5s9hvjT3STlTai3dm+Y8AilZD+Bj9owZyWRM4QI82CRPGqDZnxjpQ910PZhNdPlSSBOwiwf5RwxZtE1GdHLsGCiEloAUPv8kYApXqZLFXeY0WGSPvBI=; 7:Hl/DRoXnc/6loEHlJK6heMbNW0K3Bmztwt+LQqT5xa+6VnUOp0/VJRhSOWOww+K+55Zndt1Moswwf4Lu651u7X3yRCKrKeQvkwd47weeFxsosaddUS+/Nkh989BnL+7+lVrXCQSI7Pe5A6ILloEtNB5tVdj4Fo5fJMT3lTQhc1CenR75jkETo94RGF8hLaSzvMeb07FFPBisE8gBOz0bwmjIGJYJV9oRwF5BAkyyhnT8iZr2LaRm9BKIm+0ns/Q0 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Oct 2018 12:58:45.9934 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0931d852-55a2-4311-dd38-08d62c549ee6 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR05MB3436 Subject: [dpdk-dev] [PATCH v3 1/3] ethdev: add generic L2/L3 tunnel encapsulation actions 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: Sun, 07 Oct 2018 12:58:49 -0000 Currenlty the encap/decap actions only support encapsulation of VXLAN and NVGRE L2 packets (L2 encapsulation is where the inner packet has a valid Ethernet header, while L3 encapsulation is where the inner packet doesn't have the Ethernet header). In addtion the parameter to to the encap action is a list of rte items, this results in 2 extra translation, between the application to the action and from the action to the NIC. This results in negetive impact on the insertion performance. Looking forward there are going to be a need to support many more tunnel encapsulations. For example MPLSoGRE, MPLSoUDP. Adding the new encapsulation will result in duplication of code. For example the code for handling NVGRE and VXLAN are exactly the same, and each new tunnel will have the same exact structure. This patch introduce a generic encapsulation for L2 tunnel types, and generic encapsulation for L3 tunnel types. In addtion the new encapsulations commands are using raw buffer inorder to save the converstion time, both for the application and the PMD. Signed-off-by: Ori Kam --- doc/guides/prog_guide/rte_flow.rst | 82 ++++++++++++++++++++++++++++++++++++++ lib/librte_ethdev/rte_flow.c | 7 ++++ lib/librte_ethdev/rte_flow.h | 79 ++++++++++++++++++++++++++++++++++++ 3 files changed, 168 insertions(+) diff --git a/doc/guides/prog_guide/rte_flow.rst b/doc/guides/prog_guide/rte_flow.rst index 1b17f6e..497afc2 100644 --- a/doc/guides/prog_guide/rte_flow.rst +++ b/doc/guides/prog_guide/rte_flow.rst @@ -2076,6 +2076,88 @@ RTE_FLOW_ERROR_TYPE_ACTION error should be returned. This action modifies the payload of matched flows. +Action: ``TUNNEL_ENCAP`` +^^^^^^^^^^^^^^^^^^^^^^^^ + +Performs a tunnel encapsulation action by encapsulating the matched flow with +a tunnel header as defined in the``rte_flow_action_tunnel_encap``. + +This action modifies the payload of matched flows. The flow definition specified +in the ``rte_flow_action_tunnel_encap`` action structure must define a valid +tunnel packet overlay. + +.. _table_rte_flow_action_tunnel_encap: + +.. table:: TUNNEL_ENCAP + + +----------------+-------------------------------------+ + | Field | Value | + +================+=====================================+ + | ``buf`` | Tunnel end-point overlay definition | + +----------------+-------------------------------------+ + | ``size`` | The size of the buffer in bytes | + +----------------+-------------------------------------+ + +Action: ``TUNNEL_DECAP`` +^^^^^^^^^^^^^^^^^^^^^^^^ + +Performs a decapsulation action by stripping all headers of the tunnel +network overlay from the matched flow. + +The flow items pattern defined for the flow rule with which a ``TUNNEL_DECAP`` +action is specified, must define a valid tunnel. If the +flow pattern does not specify a valid tunnel then a +RTE_FLOW_ERROR_TYPE_ACTION error should be returned. + +This action modifies the payload of matched flows. + +Action: ``TUNNEL_ENCAP_L3`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Replace the packet layer 2 header with the encapsulation tunnel header +as defined in the ``rte_flow_action_tunnel_encap_l3``. + +This action modifies the payload of matched flows. The flow definition specified +in the ``rte_flow_action_tunnel_encap_l3`` action structure must define a valid +tunnel packet overlay. + +.. _table_rte_flow_action_tunnel_encap_l3: + +.. table:: TUNNEL_ENCAP_L3 + + +----------------+-------------------------------------+ + | Field | Value | + +================+=====================================+ + | ``buf`` | Tunnel end-point overlay definition | + +----------------+-------------------------------------+ + | ``size`` | The size of the buffer in bytes | + +----------------+-------------------------------------+ + +Action: ``TUNNEL_DECAP_L3`` +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Replace the packet tunnel network overlay from the matched flow with +layer 2 header as defined by ``rte_flow_action_tunnel_decap_l3``. + +The flow items pattern defined for the flow rule with which a ``TUNNEL_DECAP_L3`` +action is specified, must define a valid tunnel. If the +flow pattern does not specify a valid tunnel then a +RTE_FLOW_ERROR_TYPE_ACTION error should be returned. + +This action modifies the payload of matched flows. + +.. _table_rte_flow_action_tunnel_decap_l3: + +.. table:: TUNNEL_DECAP_L3 + + +----------------+-------------------------------------+ + | Field | Value | + +================+=====================================+ + | ``buf`` | Layer 2 definition | + +----------------+-------------------------------------+ + | ``size`` | The size of the buffer in bytes | + +----------------+-------------------------------------+ + Negative types ~~~~~~~~~~~~~~ diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c index 9c56a97..4b548b8 100644 --- a/lib/librte_ethdev/rte_flow.c +++ b/lib/librte_ethdev/rte_flow.c @@ -123,6 +123,13 @@ struct rte_flow_desc_data { MK_FLOW_ACTION(VXLAN_DECAP, 0), MK_FLOW_ACTION(NVGRE_ENCAP, sizeof(struct rte_flow_action_vxlan_encap)), MK_FLOW_ACTION(NVGRE_DECAP, 0), + MK_FLOW_ACTION(TUNNEL_ENCAP, + sizeof(struct rte_flow_action_tunnel_encap)), + MK_FLOW_ACTION(TUNNEL_DECAP, 0), + MK_FLOW_ACTION(TUNNEL_ENCAP_L3, + sizeof(struct rte_flow_action_tunnel_encap_l3)), + MK_FLOW_ACTION(TUNNEL_DECAP_L3, + sizeof(struct rte_flow_action_tunnel_decap_l3)), }; static int diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h index f062ffe..76b4759 100644 --- a/lib/librte_ethdev/rte_flow.h +++ b/lib/librte_ethdev/rte_flow.h @@ -1506,6 +1506,40 @@ enum rte_flow_action_type { * error. */ RTE_FLOW_ACTION_TYPE_NVGRE_DECAP, + + /** + * Encapsulate the packet with tunnel header as defined in + * rte_flow_action_tunnel_encap action structure. + * + * See struct rte_flow_action_tunnel_encap. + */ + RTE_FLOW_ACTION_TYPE_TUNNEL_ENCAP, + + /** + * Decapsulate outer most tunnel from matched flow. + * + * The flow pattern must have a valid tunnel header + */ + RTE_FLOW_ACTION_TYPE_TUNNEL_DECAP, + + /** + * Remove the packet L2 header and encapsulate the + * packet with tunnel header as defined in + * rte_flow_action_tunnel_encap_l3 action structure. + * + * See struct rte_flow_action_tunnel_encap. + */ + RTE_FLOW_ACTION_TYPE_TUNNEL_ENCAP_L3, + + /** + * Decapsulate outer most tunnel from matched flow, + * and add L2 layer. + * + * The flow pattern must have a valid tunnel header. + * + * See struct rte_flow_action_tunnel_decap_l3 + */ + RTE_FLOW_ACTION_TYPE_TUNNEL_DECAP_L3, }; /** @@ -1869,6 +1903,51 @@ struct rte_flow_action_nvgre_encap { struct rte_flow_item *definition; }; +/** + * @warning + * @b EXPERIMENTAL: this structure may change without prior notice + * + * RTE_FLOW_ACTION_TYPE_TUNNEL_ENCAP + * + * Tunnel end-point encapsulation data definition + * + * The encapsulation header is provided through raw buffer. + */ +struct rte_flow_action_tunnel_encap { + uint8_t *buf; /**< Encapsulation data. */ + uint16_t size; /**< Buffer size. */ +}; + +/** + * @warning + * @b EXPERIMENTAL: this structure may change without prior notice + * + * RTE_FLOW_ACTION_TYPE_TUNNEL_ENCAP_L3 + * + * Tunnel end-point encapsulation data definition + * + * The encapsulation header is provided through raw buffer. + */ +struct rte_flow_action_tunnel_encap_l3 { + uint8_t *buf; /**< Encapsulation data. */ + uint16_t size; /**< Buffer size. */ +}; + +/** + * @warning + * @b EXPERIMENTAL: this structure may change without prior notice + * + * RTE_FLOW_ACTION_TYPE_TUNNEL_DECAP_L3 + * + * Layer 2 definition to encapsulte the packet after decapsulating the packet. + * + * The layer 2 definition header is provided through raw buffer. + */ +struct rte_flow_action_tunnel_decap_l3 { + uint8_t *buf; /**< L2 data. */ + uint16_t size; /**< Buffer size. */ +}; + /* * Definition of a single action. * -- 1.8.3.1