From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id B4F67374 for ; Tue, 27 Jun 2017 23:48:36 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 4D18C22CBA; Tue, 27 Jun 2017 17:48:36 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 27 Jun 2017 17:48:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=khabUTFGdw7fFf5 oSD8gL8c16kq2bw5SK2au8jR82bk=; b=kj9Jii4K5O+pMfAujpf0ak/R2A3EXm1 2gAG0ku4sFN6QpQqj6korfQj+J3Gvzb9U/RDKadBKLgcr5KQVWmyUO4ssmkchjaN U61iUSCGR4jZ9O3wtHNGfSvryrwZFrNWcL8AfAqUmNnh2IVSRSe4znTgHl5blqzm pgT8nN4rMcuQ= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=khabUTFGdw7fFf5oSD8gL8c16kq2bw5SK2au8jR82bk=; b=GtTvqWre /fsejenCaOREWnaImHDTWMCy4kVY/wTQfizLA8FE7E6X80mx1RYD3fPNbUBcNSSD H8PEmQTlcfpR8qg6Gd2MFVGhKzZv/4k1YvP6tj02g5IYjW5JvJN/DUkXRnQqa6qI V5+Uu3pYBwTJP+CV+B5lSHrUvMjdhhhNVSYtwwx7kxlpngpX7yd0ndfLDEa3V/3B LkXFk/t6nHEny7wlholg4K9Zfz7/YoFf1dn0oGn+h09SjvPFiendt8spDBrzUyEH vH6wVI07R/A1oY3tL2qCUtQZ/wGBDBoqWKKUR2INf1TwHtoXGUJPpzHkM4GRJHvV A/F1wNGq/k5NqA== X-ME-Sender: X-Sasl-enc: tWIwBgbU9Vy3m7PnATMFa2mC2dWUIZXInUUNEZYSnZQ2 1498600116 Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 047EF7E780; Tue, 27 Jun 2017 17:48:36 -0400 (EDT) From: Thomas Monjalon To: Gaetan Rivet Cc: dev@dpdk.org, adrien.mazarguil@6wind.com Date: Tue, 27 Jun 2017 23:48:34 +0200 Message-ID: <74944501.qiFWTKhjmz@xps> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] ethdev: add flow API rule copy function 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: Tue, 27 Jun 2017 21:48:37 -0000 19/05/2017 17:21, Gaetan Rivet: > --- a/lib/librte_ether/rte_flow.c > +++ b/lib/librte_ether/rte_flow.c > @@ -33,12 +33,70 @@ > > #include > > +#include > #include > #include > #include "rte_ethdev.h" > #include "rte_flow_driver.h" > #include "rte_flow.h" > > +/** Generate flow_item[] entry. */ > +#define MK_FLOW_ITEM(t, s) \ > + [RTE_FLOW_ITEM_TYPE_ ## t] = { \ > + .name t, \ > + .size = s, \ > + } > + > +/** Information about known flow pattern items. */ > +const struct rte_flow_desc_data rte_flow_desc_item[] = { > + MK_FLOW_ITEM(END, 0), > + MK_FLOW_ITEM(VOID, 0), > + MK_FLOW_ITEM(INVERT, 0), > + MK_FLOW_ITEM(ANY, sizeof(struct rte_flow_item_any)), > + MK_FLOW_ITEM(PF, 0), > + MK_FLOW_ITEM(VF, sizeof(struct rte_flow_item_vf)), > + MK_FLOW_ITEM(PORT, sizeof(struct rte_flow_item_port)), > + MK_FLOW_ITEM(RAW, sizeof(struct rte_flow_item_raw)), /* +pattern[] */ > + MK_FLOW_ITEM(ETH, sizeof(struct rte_flow_item_eth)), > + MK_FLOW_ITEM(VLAN, sizeof(struct rte_flow_item_vlan)), > + MK_FLOW_ITEM(IPV4, sizeof(struct rte_flow_item_ipv4)), > + MK_FLOW_ITEM(IPV6, sizeof(struct rte_flow_item_ipv6)), > + MK_FLOW_ITEM(ICMP, sizeof(struct rte_flow_item_icmp)), > + MK_FLOW_ITEM(UDP, sizeof(struct rte_flow_item_udp)), > + MK_FLOW_ITEM(TCP, sizeof(struct rte_flow_item_tcp)), > + MK_FLOW_ITEM(SCTP, sizeof(struct rte_flow_item_sctp)), > + MK_FLOW_ITEM(VXLAN, sizeof(struct rte_flow_item_vxlan)), > + MK_FLOW_ITEM(MPLS, sizeof(struct rte_flow_item_mpls)), > + MK_FLOW_ITEM(GRE, sizeof(struct rte_flow_item_gre)), > +}; When rebasing, do not forget these new lines: + MK_FLOW_ITEM(E_TAG, sizeof(struct rte_flow_item_e_tag)), + MK_FLOW_ITEM(NVGRE, sizeof(struct rte_flow_item_nvgre)), from 0f01a7e38394 ("app/testpmd: fix creating E-Tag and NVGRE flow rules")