From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EDE69A0548; Tue, 17 Aug 2021 13:41:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6E0ED407FF; Tue, 17 Aug 2021 13:41:13 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 327BE4014E for ; Tue, 17 Aug 2021 13:41:10 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10078"; a="196313964" X-IronPort-AV: E=Sophos;i="5.84,328,1620716400"; d="scan'208";a="196313964" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Aug 2021 04:40:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,328,1620716400"; d="scan'208";a="510425445" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by fmsmga004.fm.intel.com with ESMTP; 17 Aug 2021 04:40:56 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Tue, 17 Aug 2021 04:40:56 -0700 Received: from orsedg603.ED.cps.intel.com (10.7.248.4) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10 via Frontend Transport; Tue, 17 Aug 2021 04:40:56 -0700 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.101) by edgegateway.intel.com (134.134.137.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2242.10; Tue, 17 Aug 2021 04:40:50 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=f6VkDqMhCdNI9E6tiuuhg29Sh/uW25J2aUeqSv+z/fNYsm+UJSCRgA/n/a+cXYbYxnmjNFHM1+AsSD3ZZNjIkD9/of/7ZKVkAZNsWikRj39uP22jidPEO7d2TIw63oguvZY+swuHSOmu7KI48LJHlywaeyWHZ+G2lTSrCiNGqlSOr+/Tqwk3kSp58d3JoIY0NYY6AeWZStrYw9ScgdXDriLEEJMOUKcUU0psokahhJ2CR1hXQ+b+K8RcCyT9F0sbRpW7hWk+3tuhMDp37d7YhrLXWcYNNdctrJHbQk9K5TdS3w3b7sOntYBXwZrDsMjUzQJzx/X4FZ+hzFsBI/b1TA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uFRhiYD1hMVBaj/+GB5YR8+bdLl0zhbEdb7TpXqX7i4=; b=bj3fxPszoRbu/ce/RqA530yUm0iOFETEkGq0uo9aQSZgjsCM7+b8R05628kVJ0v+anOjJvRNg2ofASjeWfvHj2KooKV+l51qcT/XxjeS1WoDmwRzwOC2SPMJPfxETvOBwXQ6XhgrAbfl918rjwV4SjPOsUsOytgrJOYfsK8xjlNX9tXNwSerk7SKRXs2SiBIbtz8mF0ESSlu5BlHWD9i+9uX4W4IcGCRPkEPCLaIsKbAUZFEq9+Ajqn31LfasfWpT4Z63MgNkbyPQ02vokEg9QSkKKwAIJRQ3KVrFlypnuUApWunyRPR/Bx1XKKD6ubbiwQQ3h+tbjfvF8Imw07xUg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=uFRhiYD1hMVBaj/+GB5YR8+bdLl0zhbEdb7TpXqX7i4=; b=Z9SLT5qeSVazk/cE36OzvMHT1S18dsSzNFv2diLubRnvcdA6jZk+Y4JesNpr4RK+9ALVCJuPNb9yIHnZw3fAHNcQ2V+WXf+qT4FpEc9T72SR7K2W6y/s2ZYLwftZ+jThjzisGdufCdOEjenLfwia8pFPDw7aEncT564Ltdrho6A= Received: from DM6PR11MB2890.namprd11.prod.outlook.com (2603:10b6:5:63::20) by DM6PR11MB4691.namprd11.prod.outlook.com (2603:10b6:5:2a6::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4415.14; Tue, 17 Aug 2021 11:40:48 +0000 Received: from DM6PR11MB2890.namprd11.prod.outlook.com ([fe80::867:8350:9cce:66e0]) by DM6PR11MB2890.namprd11.prod.outlook.com ([fe80::867:8350:9cce:66e0%7]) with mapi id 15.20.4415.024; Tue, 17 Aug 2021 11:40:48 +0000 From: "Iremonger, Bernard" To: Sowmini Varadhan , "sowmini05@gmail.com" , "dev@dpdk.org" CC: "thomas@monjalon.net" Thread-Topic: [PATCH 1/2] Hooks to allow the setting of filters on tcp flags Thread-Index: AQHXj7co27qAL0p050+8KfqLEKluvat3jzgQ Date: Tue, 17 Aug 2021 11:40:48 +0000 Message-ID: References: <6929785372a5bbaaa47a273163df7a53c2bf3203.1628796991.git.sovaradh@linux.microsoft.com> In-Reply-To: <6929785372a5bbaaa47a273163df7a53c2bf3203.1628796991.git.sovaradh@linux.microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: linux.microsoft.com; dkim=none (message not signed) header.d=none;linux.microsoft.com; dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 94270b5f-0bfd-4449-3cf7-08d96173dbcc x-ms-traffictypediagnostic: DM6PR11MB4691: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3513; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8ei9/vU+vE+YqGV+IHeqrlcdK4/gRK7SgH9W/PGqtAsaCkAeW2U0fdexyTqX0sOdyNKWPYu1uqJmpcrs2VU+qAGfKikIXk935/5YdRol9H2vjs644DcoPxqvp3XdMLrgXCz/S7UpFHf5mo9pnRCZJg2RZAegVFjx7T1hGb+XYCTzWTd+rrnii50BvaNy1YLvLG9o6+IRX0C2PE+R6GC9Meb0HX7vOjd8Td5gj6q9glUJfYYavwV1joozGLLSMZ/FWx8/Ho55rDDqR/P3UwsWr1/MKgb0DNV11e+5ZeZ3ZqUO7Bx8TZJpplxHGc+zSVlFOJtF9vjEykbUKvJB5KhNGSS9ktltN1CnfGkBT+nfvS5PPo4gQ3bYQkV6/70Ny/ZzO7wCHk7czaDqN+MeFuaOHP4GRlCVSLXyGDdyG47rpSIiu60FOKP597vhm+W296S3Sii8vKoAdqmA/6qqmGI7tRPC9zuinFTgayYdPT1J84MUba8G2LiP8lZ3Fo6WCIg9HwqaPY61j2N7NO45oEM39XMhQiR6JxY2pafZqNCXDPuqQM+r6n+GsNrTLxgwlI5iN9xp8jMDm7Y5KRq302/BxRyv16y/5gdlV6gRTgRN6/GCQDvlAeSy6KdkSq5cjMBDL8TMhS8Im2w0cEYywVspYXTYZhMEzQaMPqpgGIiSeV1t0NTbyqlqA6jHvmDLxInwitFrwqSZQxT2fMPXNpNWB1OWjSnR95qn//WoU0ERnEbY68UmPXEqB0+zbk7PzxRD059rj3sBoHnsoHLbGgA+IEfdMObpJGrGffFXxLvaqFRQ05U1Xx1QaZ1x53/a/SmB x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR11MB2890.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(136003)(396003)(366004)(39860400002)(346002)(376002)(52536014)(6506007)(66556008)(53546011)(64756008)(83380400001)(478600001)(966005)(66446008)(86362001)(186003)(7696005)(8936002)(33656002)(55016002)(4326008)(5660300002)(9686003)(2906002)(76116006)(122000001)(38100700002)(110136005)(71200400001)(316002)(66946007)(8676002)(26005)(66476007)(38070700005)(21314003); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?PX2l6CZzf5kK/3qGF6eI3ZQWYbGiXrHH5Jc2hkW2b+bgR6uWRd8M6j0r63xq?= =?us-ascii?Q?1MfYPuyRqSv6aU161GF9Oq/fSusSC2qJeP/FRa0r5OIzvZPJXV9Bg/aB1tbE?= =?us-ascii?Q?o8yoaa9Ky/NHqh4D6F6Rj9GcrB+vU3zmK7LROOHYDiCtH7/cU3da4jaqmabj?= =?us-ascii?Q?s/5jv4pgFSfEoH4I/DXW+lV71Cb9DNMri334+p0X+jOkC8X2+WTWjbfkuepW?= =?us-ascii?Q?58vrnOa/yUMdIaKyx3zMRLsrKbkukm0oabGR20srwV82JFVNuHLeKAOAuHVp?= =?us-ascii?Q?sq7xyvtaTB/NpK3+p+VeyqW9NwADJud8ScSCuvhugZ4ZbD7nBrdtlts+GbvJ?= =?us-ascii?Q?t82j7kgv1VVUFhp0b2k7YpwRf2teYSE6XfIdvbjboWw8pNszmUpzxB2U1hs2?= =?us-ascii?Q?Mju2vMultKj/rbPYaGrZe20BSzi19khR4w6prsrUIMLXUKme7M/76AGUPFqk?= =?us-ascii?Q?jzAecnn812p0b3zgnVoESQnwfth+/36oxmLgvcgTlUskUdqxy9z5l9GPu0al?= =?us-ascii?Q?SECAbPW+h5jpjtK1To+OOROXj9M9l41YsxYMWro0zdkKIBKu62vo4mUe272R?= =?us-ascii?Q?Mq47GZFrIr5h+fLUZpvaJTdUFe8igvpRZyOZW+JPNZudrLh4DDkfbolxHfZT?= =?us-ascii?Q?Fw5PSDIvxJ3UqcS31PGaumhaFe/soAtqzQkPRo/9cpQduRfLMHHiA2MtKStC?= =?us-ascii?Q?RU/TIDiAdtdFFHTSAMnNDMjkbM5pxhhXZM6hXAbDyDl1MEB2oJlWYRpflsIe?= =?us-ascii?Q?KQ7qBlXeWv9LKHzkOa4wUfLoPtji5PbrEbwvUvPFJeeNIIXWC5Ui/SmbEVjm?= =?us-ascii?Q?+K4lzrOgHrGbwXGCES2uDcBrTwPc4E2n8wsOkSywZCYbIltdbjgBhKMr3LxJ?= =?us-ascii?Q?iJ0VyG7dYMJw1ieOPgVidRzG2T07R9/bI3GkqW+Rt4wtTdi/j1fSN1dWv7fs?= =?us-ascii?Q?6psf9Elgkh4bfLcrG64sCkVkrZQ1qV/IyZ3tBemKNvt1It53NIzDlPMBO61Z?= =?us-ascii?Q?nfMK4B4AgBqZ+WfKJwyVoZqeO3kwKza2ma4O2jeKnN0RUULl6OE5M1xkou8s?= =?us-ascii?Q?wdsofMjLKCJ8sUsWyAJYg3WnWYlaTeEslUHSeHO4be3dTfokUNBAtZp3yaCC?= =?us-ascii?Q?HT2vVBON140rUH43hNP8F1XBQFE0xNtivmQRzKbz3oja3w+w4SbAZRnLERPO?= =?us-ascii?Q?0HgnGdmWKZoTRpUL1/8lWK0VxDKtB87GBJ8ANsU/bOAG+dgKAhhW0XmAoY/N?= =?us-ascii?Q?tHgaCcdJKuL6K0s+hJbFaSUReHR3FCgfpZU+AQfmSsG12nPuXGCiDmkCwJz7?= =?us-ascii?Q?CnnaEvhzYnXXx34ItMWV7RMB?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM6PR11MB2890.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 94270b5f-0bfd-4449-3cf7-08d96173dbcc X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Aug 2021 11:40:48.5175 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: sb+79GiY/czamUiPpRFe2Gd4vCgFd14VzcB5klGS5qpHFgxIk7uVOwTQep5VLP8Vng5WgKgXgRDACOk3lFsnm1Bj08Wjf2GZYZwWCGxk968= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4691 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 1/2] Hooks to allow the setting of filters on tcp flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 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" Hi Sowmini, > -----Original Message----- > From: Sowmini Varadhan > Sent: Thursday, August 12, 2021 9:18 PM > To: sowmini05@gmail.com; Iremonger, Bernard > ; dev@dpdk.org; > sovaradh@linux.microsoft.com > Cc: thomas@monjalon.net > Subject: [PATCH 1/2] Hooks to allow the setting of filters on tcp flags ~/dpdk_21_08/devtools# ./check-git-log.sh -1 Wrong headline format: Hooks to allow the setting of filters on tcp flags The subject line should be prefixed with examples/flow_classify: examples/flow_classify: Hooks to allow the setting of filters on tcp flags >=20 > The rte_eth_ntuple_filter allows tcp_flags which can check for things lik= e > #define RTE_TCP_CWR_FLAG 0x80 /**< Congestion Window Reduced */ > #define RTE_TCP_ECE_FLAG 0x40 /**< ECN-Echo */ > #define RTE_TCP_URG_FLAG 0x20 /**< Urgent Pointer field significant *= / > #define RTE_TCP_ACK_FLAG 0x10 /**< Acknowledgment field significant > */ > #define RTE_TCP_PSH_FLAG 0x08 /**< Push Function */ > #define RTE_TCP_RST_FLAG 0x04 /**< Reset the connection */ > #define RTE_TCP_SYN_FLAG 0x02 /**< Synchronize sequence numbers */ > #define RTE_TCP_FIN_FLAG 0x01 /**< No more data from sender */ but > there are no existing examples that demonstrate how to use this feature. >=20 > This patch extends the exisiting classification support to allow an optio= nal Typo: " exisiting" should be "existing" > flags in the input file. The flags string can be any concatenation of cha= racters > from {C, E, U, A, P, R, S, F} and "*" indicates "dont care". These flags = are set in > the ntuple_filter and are used to construct the tcp_spec and tcp_mask sen= t > to the driver >=20 > The rte_acl_field_def is updated to use the (u8) tcp flag as lookup key. > Note that, as per > https://doc.dpdk.org/guides/prog_guide/packet_classif_access_ctrl.html > this field MUST be allocated fo4 4 bytes, thus it has sizeof(uint32_t). Typo: "fo4" should be "for" =20 >=20 > However, also note the XXX in this commit: additional updates are needed = to > the rte_flow_classify_table_entry_add() so that it does not ignore any ke= y > fields other than the 5-tuple. >=20 > Signed-off-by: Sowmini Varadhan > --- > examples/flow_classify/flow_classify.c | 87 ++++++++++++++++++++-- > examples/flow_classify/ipv4_rules_file.txt | 22 +++--- > 2 files changed, 91 insertions(+), 18 deletions(-) >=20 > diff --git a/examples/flow_classify/flow_classify.c > b/examples/flow_classify/flow_classify.c > index db71f5aa04..772b15adf2 100644 > --- a/examples/flow_classify/flow_classify.c > +++ b/examples/flow_classify/flow_classify.c > @@ -51,6 +51,7 @@ enum { > CB_FLD_DST_PORT_MASK, > CB_FLD_PROTO, > CB_FLD_PRIORITY, > + CB_FLD_TCP_FLAGS, > CB_FLD_NUM, > }; >=20 > @@ -86,6 +87,7 @@ enum { > DST_FIELD_IPV4, > SRCP_FIELD_IPV4, > DSTP_FIELD_IPV4, > + TCP_FLAGS_FIELD, > NUM_FIELDS_IPV4 > }; >=20 > @@ -93,7 +95,8 @@ enum { > PROTO_INPUT_IPV4, > SRC_INPUT_IPV4, > DST_INPUT_IPV4, > - SRCP_DESTP_INPUT_IPV4 > + SRCP_DESTP_INPUT_IPV4, > + TCP_FLAGS_INDEX, > }; >=20 > static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] =3D { @@ -150= ,6 > +153,17 @@ static struct rte_acl_field_def ipv4_defs[NUM_FIELDS_IPV4] =3D= { > sizeof(struct rte_ipv4_hdr) + > offsetof(struct rte_tcp_hdr, dst_port), > }, > + /* next field must be 4 bytes, even though flags is only 1 byte */ > + { > + /* rte_flags */ > + .type =3D RTE_ACL_FIELD_TYPE_BITMASK, > + .size =3D sizeof(uint32_t), > + .field_index =3D TCP_FLAGS_FIELD, > + .input_index =3D TCP_FLAGS_INDEX, > + .offset =3D sizeof(struct rte_ether_hdr) + > + sizeof(struct rte_ipv4_hdr) + > + offsetof(struct rte_tcp_hdr, tcp_flags), > + }, > }; > /* >8 End of creation of ACL table. */ >=20 > @@ -285,12 +299,14 @@ lcore_main(struct flow_classifier *cls_app) > int ret; > int i =3D 0; >=20 > - ret =3D rte_flow_classify_table_entry_delete(cls_app->cls, > - rules[7]); > - if (ret) > - printf("table_entry_delete failed [7] %d\n\n", ret); > - else > - printf("table_entry_delete succeeded [7]\n\n"); > + if (rules[7]) { > + ret =3D rte_flow_classify_table_entry_delete(cls_app->cls, > + rules[7]); > + if (ret) > + printf("table_entry_delete failed [7] %d\n\n", ret); > + else > + printf("table_entry_delete succeeded [7]\n\n"); > + } >=20 > /* > * Check that the port is on the same NUMA node as the polling > thread @@ -410,6 +426,53 @@ parse_ipv4_net(char *in, uint32_t *addr, > uint32_t *mask_len) > return 0; > } >=20 > +static int > +get_tcp_flags(char *in, struct rte_eth_ntuple_filter *ntuple_filter) { > + int len =3D strlen(in); > + int i; > + uint8_t flags =3D 0; > + > + if (strcmp(in, "*") =3D=3D 0) { > + ntuple_filter->tcp_flags =3D 0; > + return 0; > + } > + > + for (i =3D 0; i < len; i++) { > + switch (in[i]) { > + case 'S': > + flags |=3D RTE_TCP_SYN_FLAG; > + break; > + case 'F': > + flags |=3D RTE_TCP_FIN_FLAG; > + break; > + case 'R': > + flags |=3D RTE_TCP_RST_FLAG; > + break; > + case 'P': > + flags |=3D RTE_TCP_PSH_FLAG; > + break; > + case 'A': > + flags |=3D RTE_TCP_ACK_FLAG; > + break; > + case 'U': > + flags |=3D RTE_TCP_URG_FLAG; > + break; > + case 'E': > + flags |=3D RTE_TCP_ECE_FLAG; > + break; > + case 'C': > + flags |=3D RTE_TCP_CWR_FLAG; > + break; > + default: > + fprintf(stderr, "unknown flag %c\n", in[i]); > + return -1; Probably better to return -EINVAL similar to other functions. > + } > + } > + ntuple_filter->tcp_flags =3D flags; > + return 0; > +} > + > static int > parse_ipv4_5tuple_rule(char *str, struct rte_eth_ntuple_filter > *ntuple_filter) { @@ -481,6 +544,8 @@ parse_ipv4_5tuple_rule(char *str, > struct rte_eth_ntuple_filter *ntuple_filter) > ntuple_filter->priority =3D (uint16_t)temp; > if (ntuple_filter->priority > FLOW_CLASSIFY_MAX_PRIORITY) > ret =3D -EINVAL; > + if (get_tcp_flags(in[CB_FLD_TCP_FLAGS], ntuple_filter)) > + return -EINVAL; >=20 > return ret; > } > @@ -597,10 +662,13 @@ add_classify_rule(struct rte_eth_ntuple_filter > *ntuple_filter, > memset(&tcp_spec, 0, sizeof(tcp_spec)); > tcp_spec.hdr.src_port =3D ntuple_filter->src_port; > tcp_spec.hdr.dst_port =3D ntuple_filter->dst_port; > + tcp_spec.hdr.tcp_flags =3D ntuple_filter->tcp_flags; >=20 > memset(&tcp_mask, 0, sizeof(tcp_mask)); > tcp_mask.hdr.src_port =3D ntuple_filter->src_port_mask; > tcp_mask.hdr.dst_port =3D ntuple_filter->dst_port_mask; > + if (tcp_spec.hdr.tcp_flags !=3D 0) > + tcp_mask.hdr.tcp_flags =3D 0xff; >=20 > tcp_item.type =3D RTE_FLOW_ITEM_TYPE_TCP; > tcp_item.spec =3D &tcp_spec; > @@ -655,6 +723,11 @@ add_classify_rule(struct rte_eth_ntuple_filter > *ntuple_filter, > return ret; > } >=20 > + /* XXX but this only adds table_type of > + * RTE_FLOW_CLASSIFY_TABLE_ACL_IP4_5TUPLE > + * i.e., it only ever does allocate_acl_ipv4_5tuple_rule() > + * so the tcp_flags is ignored! > + */ > rule =3D rte_flow_classify_table_entry_add( > cls_app->cls, &attr, pattern_ipv4_5tuple, > actions, &key_found, &error); > diff --git a/examples/flow_classify/ipv4_rules_file.txt > b/examples/flow_classify/ipv4_rules_file.txt > index dfa0631fcc..415573732a 100644 > --- a/examples/flow_classify/ipv4_rules_file.txt > +++ b/examples/flow_classify/ipv4_rules_file.txt > @@ -1,14 +1,14 @@ > #file format: > -#src_ip/masklen dst_ip/masklen src_port : mask dst_port : mask > proto/mask priority > +#src_ip/masklen dst_ip/masklen src_port : mask dst_port : mask > +proto/mask priority tcp_flags > # > -2.2.2.3/24 2.2.2.7/24 32 : 0xffff 33 : 0xffff 17/0xff 0 > -9.9.9.3/24 9.9.9.7/24 32 : 0xffff 33 : 0xffff 17/0xff 1 > -9.9.9.3/24 9.9.9.7/24 32 : 0xffff 33 : 0xffff 6/0xff 2 > -9.9.8.3/24 9.9.8.7/24 32 : 0xffff 33 : 0xffff 6/0xff 3 > -6.7.8.9/24 2.3.4.5/24 32 : 0x0000 33 : 0x0000 132/0xff 4 > -6.7.8.9/32 192.168.0.36/32 10 : 0xffff 11 : 0xffff 6/0xfe 5 > -6.7.8.9/24 192.168.0.36/24 10 : 0xffff 11 : 0xffff 6/0xfe 6 > -6.7.8.9/16 192.168.0.36/16 10 : 0xffff 11 : 0xffff 6/0xfe 7 > -6.7.8.9/8 192.168.0.36/8 10 : 0xffff 11 : 0xffff 6/0xfe 8 > +2.2.2.3/24 2.2.2.7/24 32 : 0xffff 33 : 0xffff 17/0xff 0 * > +9.9.9.3/24 9.9.9.7/24 32 : 0xffff 33 : 0xffff 17/0xff 1 * > +9.9.9.3/24 9.9.9.7/24 32 : 0xffff 33 : 0xffff 6/0xff 2 * > +9.9.8.3/24 9.9.8.7/24 32 : 0xffff 33 : 0xffff 6/0xff 3 * > +6.7.8.9/24 2.3.4.5/24 32 : 0x0000 33 : 0x0000 132/0xff 4 * > +6.7.8.9/32 192.168.0.36/32 10 : 0xffff 11 : 0xffff 6/0xfe 5 * > +6.7.8.9/24 192.168.0.36/24 10 : 0xffff 11 : 0xffff 6/0xfe 6 * > +6.7.8.9/16 192.168.0.36/16 10 : 0xffff 11 : 0xffff 6/0xfe 7 * > +6.7.8.9/8 192.168.0.36/8 10 : 0xffff 11 : 0xffff 6/0xfe 8 * > #error rules > -#9.8.7.6/8 192.168.0.36/8 10 : 0xffff 11 : 0xffff 6/0xfe 9 \ No newline = at end > of file > +#9.8.7.6/8 192.168.0.36/8 10 : 0xffff 11 : 0xffff 6/0xfe 9 * > -- > 2.17.1