From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id E5F49A0679 for ; Wed, 3 Apr 2019 12:49:13 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id CD1691B147; Wed, 3 Apr 2019 12:49:12 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150079.outbound.protection.outlook.com [40.107.15.79]) by dpdk.org (Postfix) with ESMTP id C3BDA1B118 for ; Wed, 3 Apr 2019 12:49:10 +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=UmapxSLk8KYF0STs8maPDdXdXP9Me4p7eHp5Hr7JqSk=; b=BfDAh52JuJRdshbUHOYdoFO+MN2kkda9UuOP5BnLPLr9R9lHBr36n3g4mHlXgfnDiiJrorOkyyvNEhuCzifsuz8sySkIlqHAYOi1BuZhrMdH3L0o2NDQr9sfK9cJrmxDyH1qDbC3HIh1v+M51zOcuwLCkirfxLnbiObmo69/pPU= Received: from VI1PR05MB4224.eurprd05.prod.outlook.com (52.133.12.13) by VI1PR05MB6078.eurprd05.prod.outlook.com (20.178.204.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1750.16; Wed, 3 Apr 2019 10:49:09 +0000 Received: from VI1PR05MB4224.eurprd05.prod.outlook.com ([fe80::bcb0:ed58:d76:cac]) by VI1PR05MB4224.eurprd05.prod.outlook.com ([fe80::bcb0:ed58:d76:cac%4]) with mapi id 15.20.1750.017; Wed, 3 Apr 2019 10:49:09 +0000 From: Dekel Peled To: Adrien Mazarguil CC: "wenzhuo.lu@intel.com" , "jingjing.wu@intel.com" , "bernard.iremonger@intel.com" , Yongseok Koh , Shahaf Shuler , "dev@dpdk.org" , Ori Kam Thread-Topic: [PATCH v2 1/3] ethdev: add actions to modify TCP header fields Thread-Index: AQHU6WbqvvsJSYxgskWKjtJdhwgGX6YqKH0AgAAVcrA= Date: Wed, 3 Apr 2019 10:49:09 +0000 Message-ID: References: <1553177917-43297-1-git-send-email-dekelp@mellanox.com> <1554218001-62012-2-git-send-email-dekelp@mellanox.com> <20190403091432.GP4889@6wind.com> In-Reply-To: <20190403091432.GP4889@6wind.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=dekelp@mellanox.com; x-originating-ip: [193.47.165.251] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 1405c231-3c79-4c5b-d85d-08d6b822003b x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(5600139)(711020)(4605104)(4618075)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7193020); SRVR:VI1PR05MB6078; x-ms-traffictypediagnostic: VI1PR05MB6078: x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-forefront-prvs: 0996D1900D x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(346002)(136003)(376002)(366004)(396003)(39860400002)(13464003)(199004)(189003)(106356001)(86362001)(486006)(105586002)(186003)(55016002)(7696005)(3846002)(9686003)(53546011)(102836004)(74316002)(256004)(81156014)(33656002)(8676002)(5660300002)(6916009)(446003)(4326008)(68736007)(478600001)(52536014)(14454004)(107886003)(25786009)(316002)(71200400001)(81166006)(8936002)(26005)(71190400001)(76176011)(6436002)(14444005)(11346002)(6506007)(229853002)(53936002)(305945005)(99286004)(476003)(6116002)(6246003)(66066001)(54906003)(97736004)(7736002)(2906002); DIR:OUT; SFP:1101; SCL:1; SRVR:VI1PR05MB6078; H:VI1PR05MB4224.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-message-info: yqRc48kIqnt7ztGNweTWpantO+2EJ7jwSIhRPR3SY9SUr5oBl2UkZOXQZmmyXx/lgzE6T2H9W+vXK7Ss/IJomo3j+PzBLZ/nsP83zXmVlhB/tFKiEVSTJsZ9jWkTbMfaiJPvnICN+iQh65Ashm38f8fJtP1slC4k/aILoO6StR4xSOD3ZhkMkEyQFKwA/wP65I4uPcngcPnrA/MNBNXKwCVPLOV3Tuoq84I4DKZl/jb0lkAeQdk/7KqJ/1LPM0hgQwMTmYN5yJo4MgGEMRYGKIENbBINZJsYHVyAiG4mUCGATrMyR0EzRoRFBqBHnNIH+8D/o9P9m85TNylqJeuo56cgCGPxdKWdaA8oerajqdqgSDTTf8fyzoQqtDOOSbKNFLVgNgFuGndnvg7qL3+8cD9i0hgMuA4obCycFXhsrQM= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1405c231-3c79-4c5b-d85d-08d6b822003b X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Apr 2019 10:49:09.0814 (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-Transport-CrossTenantHeadersStamped: VI1PR05MB6078 Subject: Re: [dpdk-dev] [PATCH v2 1/3] ethdev: add actions to modify TCP header fields 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" Message-ID: <20190403104909.6-BJ6jrGdRs6l-Rru6Ic-nfvZ2LSnDDLTyOHPU2JC3c@z> Thanks, PSB. > -----Original Message----- > From: Adrien Mazarguil > Sent: Wednesday, April 3, 2019 12:15 PM > To: Dekel Peled > Cc: wenzhuo.lu@intel.com; jingjing.wu@intel.com; > bernard.iremonger@intel.com; Yongseok Koh ; > Shahaf Shuler ; dev@dpdk.org; Ori Kam > > Subject: Re: [PATCH v2 1/3] ethdev: add actions to modify TCP header fiel= ds >=20 > Hi Dekel, >=20 > On Tue, Apr 02, 2019 at 06:13:19PM +0300, Dekel Peled wrote: > > Add actions: > > - INC_TCP_SEQ - Increase sequence number in the outermost TCP header. > > - DEC_TCP_SEQ - Decrease sequence number in the outermost TCP > header. > > - INC_TCP_ACK - Increase acknowledgment number in the outermost TCP > > header. > > - DEC_TCP_ACK - Decrease acknowledgment number in the outermost TCP > > header. > > > > Original work by Xiaoyu Min. > > > > Signed-off-by: Dekel Peled > > > +Action: ``INC_TCP_SEQ`` > > +^^^^^^^^^^^^^^^^^^^^^^^ > > + > > +Increase sequence number in the outermost TCP header. > > + > > +If this action is used without a valid RTE_FLOW_ITEM_TYPE_TCP flow > > +pattern item, behavior is unspecified, depending on PMD > implementation. >=20 > I still don't agree with the wording as it implies one must combine this = action > with the TCP pattern item or else, while one should simply ensure the > presence of TCP traffic somehow. This may be done by a prior filtering ru= le. >=20 > So here's a generic suggestion which could be used with pretty much all > modifying actions (other actions have the same problem and will have to b= e > fixed as well eventually): >=20 > Using this action on non-matching traffic results in undefined behavior. >=20 > This comment applies to all instances in this patch. I accept your suggestion, indeed the existing actions have the problematic = condition. However I would like to currently leave this patch as-is for consistency. I will send a fix patch for next release, applying the updated text to all = modify-header actions. >=20 > > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this structure may change without prior notice > > + * > > + * RTE_FLOW_ACTION_TYPE_INC_TCP_SEQ > > + * RTE_FLOW_ACTION_TYPE_DEC_TCP_SEQ > > + * > > + * Increase/Decrease outermost TCP sequence number */ struct > > +rte_flow_action_modify_tcp_seq { > > + rte_be32_t value; /**< Value to increase/decrease by. */ }; > > + > > +/** > > + * @warning > > + * @b EXPERIMENTAL: this structure may change without prior notice > > + * > > + * RTE_FLOW_ACTION_TYPE_INC_TCP_ACK > > + * RTE_FLOW_ACTION_TYPE_DEC_TCP_ACK > > + * > > + * Increase/Decrease outermost TCP acknowledgment number. > > + */ > > +struct rte_flow_action_modify_tcp_ack { > > + rte_be32_t value; /**< Value to increase/decrease by. */ }; >=20 > Thanks for adding experimental tags and comments, however you didn't > reply anything about using a single action, or at least a single structur= e for > add/sub/set? I'd like to hear your thoughts. It's either 2 actions with 1 parameters, or 1 action with 2 parameters. The current implementation is more straight-forward in my opinion. >=20 > -- > Adrien Mazarguil > 6WIND