From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0042.outbound.protection.outlook.com [104.47.0.42]) by dpdk.org (Postfix) with ESMTP id 5F2105B38 for ; Mon, 5 Nov 2018 10:35:30 +0100 (CET) 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=EiY2CqgHbFocQ7n4+99jMWSjChsf7K9B4PTkB+0v5AU=; b=pH8WxzRPwSdhBvWzk5fDKY1Y9HnlRQ+d9IUrkauVESgINvDshgST/9kJYokZK8Qo8EvVBcKUlzGJgQqNyA1v6+19abQikOdBydZ6TqjEDOYAhlEZvBZNiaRP77INrBMEm4kQ9dZYo8XPmMGbzG0YAPlKM8Nvpyah0aU96rw6al8= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.187.142) by AM4PR05MB3186.eurprd05.prod.outlook.com (10.171.186.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.27; Mon, 5 Nov 2018 09:35:28 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::61ec:ffec:5ebf:7bd6]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::61ec:ffec:5ebf:7bd6%3]) with mapi id 15.20.1294.028; Mon, 5 Nov 2018 09:35:28 +0000 From: Ori Kam To: Ori Kam CC: "dev@dpdk.org" Thread-Topic: [PATCH 2/2] examples/flow_filtering: fix remove vlan item Thread-Index: AQHUdOrj7tcM3ka9MkKjCMx5XvtTGQ== Date: Mon, 5 Nov 2018 09:35:28 +0000 Message-ID: <1541410503-29360-2-git-send-email-orika@mellanox.com> References: <1541410503-29360-1-git-send-email-orika@mellanox.com> In-Reply-To: <1541410503-29360-1-git-send-email-orika@mellanox.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: CWLP123CA0099.GBRP123.PROD.OUTLOOK.COM (2603:10a6:401:5f::15) To AM4PR05MB3425.eurprd05.prod.outlook.com (2603:10a6:205:6::14) x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [37.142.13.130] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM4PR05MB3186; 6:1bgsae1pCu3YSwmdncXu8OKLVQ3kEcK1XDDu9DwHwO5kRy/yyPzBdfePb4NKXmJqzXo6GH8JTcvRRvoMlkrwwNVTdCotmwbK5HqfaLGmGSPIGx7mHtt6Ot9zCtS/PwPIQR2cJ2W5WN+OlxoHIQyCTFKQx5romc5yKfM2WkutqrBryncOGvQYgawnCtV7Vc65XYma/duod2XSOZk1YF8eDM7cNARKZ4WtlaSa35BgT+kOdpApnC7R9BQi05F4I48VXcAEhNZMd9q+sD0LhlCA8QGYSH9lFhClSQB/abNLwSugWWST8zMn2xm5k7p6683ZH6A5h6VQP2qHDRCZWCelR7ij0Pu92WpIjlWhDyR4nme72SB5Le4BerE7Bl5aWM6jNWvoC/liuMi00w0bbY078TW+uXBdxPPR07UvTmfeCOV6OoOAkHVMj1wrPxMbEty9okSEiC4TPiit/N6TMTATbw==; 5:O6abl4qqOaB6K+RCosM+5HozWAswcfi4Chf6N2QVlwfvcrXmKB/007oNCcYcKOt+oGHyBuxJIcmyp9G8ppR9vE8EXvMSDn4Im5NOuqcC25HjZ20HLbX1ZZXWDBIibZymfsZYlbCd7souNUFq7SIQntvYZDR/P0lmxtiDclHFPUQ=; 7:nLmG5iJs17Y0grE0gTwUURkvTgSbbAKWuCtLnvQMga6Kgiz50/0OXwiHs01j3wHPQ3ijue/VACePkRvYPyMM83SJ3x1ZaksxvL3JtZHusQ8TdjoHtCDKcEvzJl1gLKJOX0JEcLvwsFliuEIbu/CMLQ== x-ms-office365-filtering-correlation-id: aee848c2-6084-469c-61b6-08d643020577 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:AM4PR05MB3186; x-ms-traffictypediagnostic: AM4PR05MB3186: authentication-results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; 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)(93006095)(93001095)(3231382)(944501410)(52105095)(3002001)(10201501046)(6055026)(148016)(149066)(150057)(6041310)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(201708071742011)(7699051)(76991095); SRVR:AM4PR05MB3186; BCL:0; PCL:0; RULEID:; SRVR:AM4PR05MB3186; x-forefront-prvs: 08476BC6EF x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(136003)(39860400002)(346002)(366004)(396003)(376002)(199004)(189003)(6436002)(6486002)(486006)(476003)(2616005)(11346002)(14444005)(446003)(7049001)(8936002)(99286004)(52116002)(4326008)(71200400001)(71190400001)(386003)(76176011)(6506007)(81166006)(6116002)(102836004)(53936002)(6512007)(186003)(8676002)(256004)(26005)(81156014)(3846002)(7736002)(305945005)(97736004)(25786009)(5660300001)(478600001)(2900100001)(2906002)(6862004)(36756003)(68736007)(6200100001)(14454004)(37006003)(86362001)(66066001)(105586002)(106356001)(316002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3186; H:AM4PR05MB3425.eurprd05.prod.outlook.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-antispam-message-info: oyGaSKGYB8os7VC3AZfxhm6duSMIvdkdzfcYNly2iBnwG/9bKuuk6p2V3Tvy7SEw4NapjucN/vWfb3FUEVhcU9q/4mO+nMeP6zMPTk51ilD6Wv7rK0c1qZV/sc4De3y8VTRomqCqGtz1N/1dcZZFsSxFFt1uyjXgHQx+gPow8Fn0tpo/Xe7MlYY9osUiRs4FTE/wucGFtzMWEuZpqaFF5NmZvzmimu0eAexzN2KsR6qjVRPbZs3qMj1Eg1r7j2U29eAlkBAKlNEdaxpAeonjWceqyHlZmrNS8/POS08J38Kksg2zlKap3MwRgjaeLTxvpGfNfd1mVBh7xfBKW9IdeUPuhW8NSYBBllgu7t02uSY= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: aee848c2-6084-469c-61b6-08d643020577 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Nov 2018 09:35:28.4111 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3186 Subject: [dpdk-dev] [PATCH 2/2] examples/flow_filtering: fix remove vlan item 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: Mon, 05 Nov 2018 09:35:30 -0000 Since the vlan is not in use and some PMD can't support vlan =3D 0 this item was removed. Fixes: 4a3ef59a10c8 ("examples/flow_filtering: add simple demo of flow API"= ) Cc: orika@mellanox.com Signed-off-by: Ori Kam --- examples/flow_filtering/flow_blocks.c | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/examples/flow_filtering/flow_blocks.c b/examples/flow_filterin= g/flow_blocks.c index 4da4592..bae7116 100644 --- a/examples/flow_filtering/flow_blocks.c +++ b/examples/flow_filtering/flow_blocks.c @@ -46,8 +46,6 @@ struct rte_flow * struct rte_flow_action_queue queue =3D { .index =3D rx_q }; struct rte_flow_item_eth eth_spec; struct rte_flow_item_eth eth_mask; - struct rte_flow_item_vlan vlan_spec; - struct rte_flow_item_vlan vlan_mask; struct rte_flow_item_ipv4 ip_spec; struct rte_flow_item_ipv4 ip_mask; int res; @@ -85,17 +83,6 @@ struct rte_flow * pattern[0].mask =3D ð_mask; =20 /* - * setting the second level of the pattern (vlan). - * since in this example we just want to get the - * ipv4 we also set this level to allow all. - */ - memset(&vlan_spec, 0, sizeof(struct rte_flow_item_vlan)); - memset(&vlan_mask, 0, sizeof(struct rte_flow_item_vlan)); - pattern[1].type =3D RTE_FLOW_ITEM_TYPE_VLAN; - pattern[1].spec =3D &vlan_spec; - pattern[1].mask =3D &vlan_mask; - - /* * setting the third level of the pattern (ip). * in this example this is the level we care about * so we set it according to the parameters. @@ -106,12 +93,12 @@ struct rte_flow * ip_mask.hdr.dst_addr =3D dest_mask; ip_spec.hdr.src_addr =3D htonl(src_ip); ip_mask.hdr.src_addr =3D src_mask; - pattern[2].type =3D RTE_FLOW_ITEM_TYPE_IPV4; - pattern[2].spec =3D &ip_spec; - pattern[2].mask =3D &ip_mask; + pattern[1].type =3D RTE_FLOW_ITEM_TYPE_IPV4; + pattern[1].spec =3D &ip_spec; + pattern[1].mask =3D &ip_mask; =20 /* the final level must be always type end */ - pattern[3].type =3D RTE_FLOW_ITEM_TYPE_END; + pattern[2].type =3D RTE_FLOW_ITEM_TYPE_END; =20 res =3D rte_flow_validate(port_id, &attr, pattern, action, error); if (!res) --=20 1.8.3.1