From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id BADD8A052E; Sun, 1 Mar 2020 08:57:03 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C226E1C02A; Sun, 1 Mar 2020 08:57:02 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2050.outbound.protection.outlook.com [40.107.21.50]) by dpdk.org (Postfix) with ESMTP id 38B871C029 for ; Sun, 1 Mar 2020 08:57:01 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=frlrBzQ1hP9arigX4rJo8qlsg6G2h0Sc0KWvJ2+yeoe+t+BZd1fxX3HkeGFarcTzLDbCTGjD8n7UUpTnwXOLoSzNryBnLleOT9/DAYp7OX99edpDRtqlJl46Pv/Sd34He5/7X4ucR2euGpdUvvlQmG/kWjxLo6wtKlxcUSGpi3W5Uelt3aUIi/7K2rRKRt4lXx7acUaDiyg7RF9PLqsjaeTvTEh5XL9/+oAVQVXe5QYIG947FAkUYJj3N+B0KZoR3u7r980L8cQAbJ5JObQRqX/HF8+8a5zfXm6O1bbtBgBVaDAJGk76GBjMicgCokJlUQO3Z5RgADXkQzFu7DgCEw== 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=TTg5Sq+sLBOs2BJcubzTpsYVdmqmQyFlIjaJhcJrKf0=; b=lxv5YD1eAkzndg3EjGHDlzNQfiloVhuBZ5AEK053S3p4Vy1cL3ve3qmqZtvlJdFdHfGFSoB7Blp4QPtbe3NYnMGQwJ4zszF2WhNIHaqQLC+PozGcaXN6HA+xhbrkYoJigUbzCMW1lB/dS1ngagcSps2Bk1X1FowUBVO4W2/Gqis30e1rW3ZvxAp8hcPSCUWgLWH9RjL9b/H6tQJYsJYsIsG9btWUPhdPgKw+dl/utLxsHbGzCrBpDeupXiI0XnqsxGeGq90uJxFTxgQUOJ1H/7NX3cT0n0iEt83QUD3nvMMSWotm+mFimg7m/JUNk88Pj6M72bj3sEiAA8CYBmC3Lg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=mellanox.com; dmarc=pass action=none header.from=mellanox.com; dkim=pass header.d=mellanox.com; arc=none 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=TTg5Sq+sLBOs2BJcubzTpsYVdmqmQyFlIjaJhcJrKf0=; b=dCACj9kJSkBTrZDsYMPVp1Do479KsAwF62hShmkph+K8P8tKQE9+IQ9DlzbGc9p0jxDckXZ5Op/dbgczypG1uoPYh3x6Ffgqw+wS0gTwVtXj5fl5AO4G+3PY3kCR0duORpG3qc5T0RIgzeiqBbu1S5TOv7uGqjkmrHJcKlfoiss= Received: from AM6PR05MB5176.eurprd05.prod.outlook.com (20.177.196.158) by AM6PR05MB5207.eurprd05.prod.outlook.com (20.177.196.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2772.18; Sun, 1 Mar 2020 07:56:59 +0000 Received: from AM6PR05MB5176.eurprd05.prod.outlook.com ([fe80::1888:dbf5:a84e:c53b]) by AM6PR05MB5176.eurprd05.prod.outlook.com ([fe80::1888:dbf5:a84e:c53b%6]) with mapi id 15.20.2772.019; Sun, 1 Mar 2020 07:56:59 +0000 From: Ori Kam To: Xiao Zhang , "dev@dpdk.org" CC: "qi.z.zhang@intel.com" , "simei.su@intel.com" , "bernard.iremonger@intel.com" Thread-Topic: [v2] app/testpmd: parse flow command line for AH Thread-Index: AQHV4ix2BGOtglmUs02b60R8lYS2TKgZ3ckAgBmbZJA= Date: Sun, 1 Mar 2020 07:56:59 +0000 Message-ID: References: <1581570460-27068-1-git-send-email-xiao.zhang@intel.com> <1581641564-58542-1-git-send-email-xiao.zhang@intel.com> In-Reply-To: <1581641564-58542-1-git-send-email-xiao.zhang@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 847d0a21-89bb-49d9-be7c-08d7bdb61ea2 x-ms-traffictypediagnostic: AM6PR05MB5207: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:6790; x-forefront-prvs: 0329B15C8A x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(376002)(136003)(396003)(346002)(366004)(39850400004)(199004)(189003)(5660300002)(33656002)(316002)(478600001)(9686003)(55016002)(86362001)(52536014)(26005)(71200400001)(8936002)(54906003)(7696005)(6506007)(186003)(4326008)(81166006)(8676002)(110136005)(66946007)(76116006)(64756008)(66446008)(66556008)(66476007)(81156014)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB5207; H:AM6PR05MB5176.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-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aJb8Xz4OEaifJX1jgLXbmgiOOpYZmswkNCeym9yG75LeSFPRAGit3TeBrLCB/NLB21zqgXwf1CbFKq06yC7ft7WxjDgkkRM/Xc2jDErikRrLGyNC4z5BndMokpoNTM6a8WXMiYy3wewiQkRRHwsP5KJ8RYWPw9XMHmPutrW5Z9PWEaKvuMDrxJ5KasP9eQ464gRLsGPxzQrSpP85XnoGDn3pJuM+N4zu7YoWO4K3cz8z0oM+yFQa0OX72NJx+TobGen3kASUt6BDYcoXegKeETqggLKgkSgckLZrcnD3RH3uw2KVPzTiE9odkihRTtf0UTLY43yuaZee1DCnBqLPwEawnqA5FheiOCpfNBHiyX+VVFwAtQ929raTZRuBxet6ulS1qgiSWzKIGs6LBARbtkFe36FnMYOjc5QznyUnpa3ZzSeZAluKDiQRVtXvoReQ x-ms-exchange-antispam-messagedata: PUqz+ltxJHDqTupIaLvtSdKnUF9+jM/YoF1g6ECy0qemVSf1eZJiQ9OjxnbfbCyUvYS7H/0e9QmqZC/63/NfDVJ52LRy2Sm0P9a947NJ+hBbfLSd3Yhv2HccDcwb89n3tyT/u/xWs+D4utqon2LFrw== x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 847d0a21-89bb-49d9-be7c-08d7bdb61ea2 X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Mar 2020 07:56:59.1614 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: FYKWqnt2G5GgBggg0zspySbToq6cxpQHVS7A/9P9SOcF2tNk16Q5qi/djwAKmDPAeorxfQeKAcdmRLIwY3Uj7g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB5207 Subject: Re: [dpdk-dev] [v2] app/testpmd: parse flow command line for AH 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > -----Original Message----- > From: Xiao Zhang > Subject: [v2] app/testpmd: parse flow command line for AH >=20 > Add AH and AH SPI to testpmd rte flow command line. > Add note and sample AH rules in testpmd guide. >=20 > Signed-off-by: Xiao Zhang > --- > v2 Add sample rules in testpmd guide. > --- > app/test-pmd/cmdline_flow.c | 29 > +++++++++++++++++++++++++++++ > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 18 ++++++++++++++++++ > 2 files changed, 47 insertions(+) >=20 > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index c2cc4c5..680cb1c 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -220,6 +220,8 @@ enum index { > ITEM_L2TPV3OIP_SESSION_ID, > ITEM_ESP, > ITEM_ESP_SPI, > + ITEM_AH, > + ITEM_AH_SPI, >=20 > /* Validate/create actions. */ > ACTIONS, > @@ -768,6 +770,7 @@ static const enum index next_item[] =3D { > ITEM_TAG, > ITEM_L2TPV3OIP, > ITEM_ESP, > + ITEM_AH, > END_SET, > ZERO, > }; > @@ -1046,6 +1049,12 @@ static const enum index item_esp[] =3D { > ZERO, > }; >=20 > +static const enum index item_ah[] =3D { > + ITEM_AH_SPI, > + ITEM_NEXT, > + ZERO, > +}; > + > static const enum index next_set_raw[] =3D { > SET_RAW_INDEX, > ITEM_ETH, > @@ -2699,6 +2708,19 @@ static const struct token token_list[] =3D { > .args =3D ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp, > hdr.spi)), > }, > + [ITEM_AH] =3D { > + .name =3D "ah", > + .help =3D "match AH header", > + .priv =3D PRIV_ITEM(AH, sizeof(struct rte_flow_item_ah)), > + .next =3D NEXT(item_ah), > + .call =3D parse_vc, > + }, > + [ITEM_AH_SPI] =3D { > + .name =3D "spi", > + .help =3D "security parameters index", > + .next =3D NEXT(item_ah, NEXT_ENTRY(UNSIGNED), item_param), > + .args =3D ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_ah, > spi)), > + }, > /* Validate/create actions. */ > [ACTIONS] =3D { > .name =3D "actions", > @@ -6444,6 +6466,9 @@ flow_item_default_mask(const struct rte_flow_item > *item) > case RTE_FLOW_ITEM_TYPE_ESP: > mask =3D &rte_flow_item_esp_mask; > break; > + case RTE_FLOW_ITEM_TYPE_AH: > + mask =3D &rte_flow_item_ah_mask; > + break; > default: > break; > } > @@ -6541,6 +6566,10 @@ cmd_set_raw_parsed(const struct buffer *in) > size =3D sizeof(struct rte_flow_item_esp); > proto =3D 0x32; > break; > + case RTE_FLOW_ITEM_TYPE_AH: > + size =3D sizeof(struct rte_flow_item_ah); > + proto =3D 0x33; > + break; > default: > printf("Error - Not supported item\n"); > *total_size =3D 0; > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > index 5103ff9..95f4f06 100644 > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > @@ -3987,6 +3987,10 @@ This section lists supported pattern items and the= ir > attributes, if any. >=20 > - ``session_id {unsigned}``: L2TPv3 over IP session identifier. >=20 > +- ``ah``: match AH header. > + > + - ``spi {unsigned}``: security parameters index. > + > Actions list > ^^^^^^^^^^^^ >=20 > @@ -4822,6 +4826,20 @@ ESP rules can be created by the following > commands:: > testpmd> flow create 0 ingress pattern eth / ipv6 / udp / esp spi is 1 = / end > actions queue index 3 / end >=20 > +Sample AH rules > +~~~~~~~~~~~~~~~~ > + > +AH rules can be created by the following commands:: > + > + testpmd> flow create 0 ingress pattern eth / ipv4 / ah spi is 1 / end a= ctions > + queue index 3 / end > + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / ah spi is 1 /= end > + actions queue index 3 / end > + testpmd> flow create 0 ingress pattern eth / ipv6 / ah spi is 1 / end a= ctions > + queue index 3 / end > + testpmd> flow create 0 ingress pattern eth / ipv6 / udp / ah spi is 1 /= end > + actions queue index 3 / end > + > BPF Functions > -------------- >=20 > -- > 2.7.4 Acked-by: Ori Kam Best, Ori Kam