From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dekel Peled Subject: Re: [PATCH v2 1/3] ethdev: add actions to modify TCP header fields 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "wenzhuo.lu@intel.com" , "jingjing.wu@intel.com" , "bernard.iremonger@intel.com" , Yongseok Koh , Shahaf Shuler , "dev@dpdk.org" , Ori Kam To: Adrien Mazarguil Return-path: 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) In-Reply-To: <20190403091432.GP4889@6wind.com> Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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