From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17481C4321A for ; Fri, 28 Jun 2019 16:18:24 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 9BA6B20645 for ; Fri, 28 Jun 2019 16:18:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=6wind.com header.i=@6wind.com header.b="ZJyk800y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9BA6B20645 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=6wind.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2D3E137B0; Fri, 28 Jun 2019 18:18:22 +0200 (CEST) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by dpdk.org (Postfix) with ESMTP id 4B9FC378E for ; Fri, 28 Jun 2019 18:18:21 +0200 (CEST) Received: by mail-wr1-f68.google.com with SMTP id x4so6903386wrt.6 for ; Fri, 28 Jun 2019 09:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=60F674bnXKeAHV/uYMG3Ish6QG9f3VVg2EO4vnd35Ts=; b=ZJyk800yzifFEUdueEtmCuUz6uVGN38iEkSedTyAszjpWkZntDYYhvFx8Xtf6roPmj TaO9r0jIwGYiF3764lfoEw4uN6oS5fwov29DuPNvRWVBZVdmBecAl3kdziDVx80ifqEM 2MGa6Kz2rsgKeijNLAKmrv0UxNGHIbEE2diM2Bgf3sPZ4AP3FayZB8iKLfC1QXXHkZcR zMLDKVEkeN3h0Weh2BJrqcbyC+cK3ehZAI9citkTdq7p74id+5/y6Pscu0K5+cmDNYXN Rp/auWrvocVfgWauSfLV4wiDcqWkMKDHsAroJCqfcUS7rAUPJIXqPXhng8nwty+h03fS D1OA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=60F674bnXKeAHV/uYMG3Ish6QG9f3VVg2EO4vnd35Ts=; b=dgF9Gy6sP/FrVpZ00tdMj0RADSPQvDzlYITD9yIU9BchZFItICbzVtLVjaawwzMB0c J52BwPSzt8AzbYak0YO0j8gBg+axYcjTGvTSPI5fQb6IbD1kPRn6h0BbfYCKMykeOJ/T 3NgrIjfnyjV6jgYRXn38LBzfWWhjQKJLgsNL59Ma8I+GxKAv+Nl1PIkz88xkJzXqrxCd iJrpk7VOW+U+f5R4SR+eYaVlX0VDYOnsXP4wkxzg7c6IdZiFZ/+eRAUzMc4x2H+dsC65 BSz588rfaMlAa9X7s4OiJF0gpUrl/inNFiE9tGiwDu/vt3sev0kqR+HM00q3qLXG6X9C 3Hjw== X-Gm-Message-State: APjAAAU/DVbQWCTlBEV2QWzJV9YGI47sWnWhY+GJNeGw6PQIT+z/RG8W UtL0+Vb8g4BmVGsvZF6MjtYokg== X-Google-Smtp-Source: APXvYqwnMjE7w3lqdetaREXgOt+C8L2a5z8Fk6j8WhKFZ0GzdaqE59drgmVAWFvtXrc48y9D3L8FkA== X-Received: by 2002:adf:9267:: with SMTP id 94mr3776113wrj.109.1561738700984; Fri, 28 Jun 2019 09:18:20 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id b5sm3079804wrq.61.2019.06.28.09.18.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Jun 2019 09:18:20 -0700 (PDT) Date: Fri, 28 Jun 2019 18:18:18 +0200 From: Adrien Mazarguil To: Andrew Rybchenko Cc: Dekel Peled , wenzhuo.lu@intel.com, jingjing.wu@intel.com, bernard.iremonger@intel.com, yskoh@mellanox.com, shahafs@mellanox.com, viacheslavo@mellanox.com, dev@dpdk.org, orika@mellanox.com Message-ID: <20190628161818.GA3911@6wind.com> References: <91371a891418062bcf88069bbd24c1cc4759f1ab.1561656978.git.dekelp@mellanox.com> <58b03d51-5aec-3943-cf63-0a4f93fbef4b@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <58b03d51-5aec-3943-cf63-0a4f93fbef4b@solarflare.com> Subject: Re: [dpdk-dev] [PATCH v7 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" On Thu, Jun 27, 2019 at 08:54:57PM +0300, Andrew Rybchenko wrote: > On 6/27/19 8:39 PM, 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. > > > > This patch introduces a new approach, using a simple integer instead > > of using an action-specific structure for each of these actions. > > This approach can be later applied to modify existing actions which > > require only a single integer. > > If we allow it, may be we should fix at least experimental API and > remove dummy structures. > > I think ideally it should be a pre-patch which allows to avoid structures. > Right now it is a mixture of two logical changes. Yep, I agree we need to split patches and affected experimental APIs should be modified as well, although the latter part can be done in a third patch, possibly a whole separate series since a number of "fix" patches might be needed. This series has been waiting long enough already. > > Signed-off-by: Dekel Peled > > A nit below (plus above), other than that > Acked-by: Andrew Rybchenko Ditto, otherwise looks good to me too, we're almost there! Dekel: this looks so much cleaner without those pesky structures :) > [...] > > > diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h > > index f3a8fb1..8c962d0 100644 > > --- a/lib/librte_ethdev/rte_flow.h > > +++ b/lib/librte_ethdev/rte_flow.h > > @@ -1650,6 +1650,46 @@ enum rte_flow_action_type { > > * See struct rte_flow_action_set_mac. > > */ > > RTE_FLOW_ACTION_TYPE_SET_MAC_DST, > > + > > + /** > > + * Increase sequence number in the outermost TCP header. > > + * > > + * Using this action on non-matching traffic will result in > > + * undefined behavior. > > + * > > + * See struct rte_flow_integer_action. > > There is no  rte_flow_integer_action, please, fix. > > [...] -- Adrien Mazarguil 6WIND