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=-10.7 required=3.0 tests=BAYES_00,DKIM_ADSP_DISCARD, DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 DA9B8C2D0A3 for ; Mon, 2 Nov 2020 11:44:12 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 2FEF9207C3 for ; Mon, 2 Nov 2020 11:44:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=oktetlabs.ru header.i=@oktetlabs.ru header.b="sdaZDxiN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2FEF9207C3 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=oktetlabs.ru 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 8BF3FC860; Mon, 2 Nov 2020 12:43:33 +0100 (CET) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by dpdk.org (Postfix) with ESMTP id 6F20DC84A for ; Mon, 2 Nov 2020 12:43:31 +0100 (CET) Received: from localhost.localdomain (unknown [188.242.7.54]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by shelob.oktetlabs.ru (Postfix) with ESMTPSA id 26E4F7F5A1; Mon, 2 Nov 2020 14:43:30 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 26E4F7F5A1 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=oktetlabs.ru; s=default; t=1604317410; bh=iH+aaeySQ1ND8ZBUCp4znFrY16Vk66xIbGOnshmnk8c=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=sdaZDxiNNGk0GpZK1orFQcOeStRS1OvtWh1cOenTczGJBCqXTlP4sTQ29Qw/KFu9W j23e/+KjUKyDKfgmnGV4T2v5Bpfps2bYLdk6it9G1nPGmOFE5EGTgxznYdNuzPnMGb QHTeb3sKSlL82dwoo9F2Uti/ZvKsyw6s5hX3CfgU= From: Ivan Malov To: dev@dpdk.org Cc: Xueming Li , Ori Kam , Wenzhuo Lu , Beilei Xing , Bernard Iremonger Date: Mon, 2 Nov 2020 14:43:16 +0300 Message-Id: <20201102114317.24492-2-ivan.malov@oktetlabs.ru> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201102114317.24492-1-ivan.malov@oktetlabs.ru> References: <20201029114644.22169-1-ivan.malov@oktetlabs.ru> <20201102114317.24492-1-ivan.malov@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH v3 2/2] app/testpmd: support shared flow action attribute transfer 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" This attribute helps PMDs to tell actions supposed to work on the so-called hardware e-switch level from regular ones. Signed-off-by: Ivan Malov --- app/test-pmd/cmdline_flow.c | 12 ++++++++++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index c68d22fda..fe18cca27 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -114,6 +114,7 @@ enum index { SHARED_ACTION_CREATE_ID, SHARED_ACTION_INGRESS, SHARED_ACTION_EGRESS, + SHARED_ACTION_TRANSFER, SHARED_ACTION_SPEC, /* Shared action destroy arguments */ @@ -782,6 +783,7 @@ static const enum index next_sa_create_attr[] = { SHARED_ACTION_CREATE_ID, SHARED_ACTION_INGRESS, SHARED_ACTION_EGRESS, + SHARED_ACTION_TRANSFER, SHARED_ACTION_SPEC, ZERO, }; @@ -4286,6 +4288,12 @@ static const struct token token_list[] = { .next = NEXT(next_sa_create_attr), .call = parse_sa, }, + [SHARED_ACTION_TRANSFER] = { + .name = "transfer", + .help = "affect rule to transfer", + .next = NEXT(next_sa_create_attr), + .call = parse_sa, + }, [SHARED_ACTION_SPEC] = { .name = "action", .help = "specify action to share", @@ -4521,6 +4529,9 @@ parse_sa(struct context *ctx, const struct token *token, case SHARED_ACTION_INGRESS: out->args.vc.attr.ingress = 1; return len; + case SHARED_ACTION_TRANSFER: + out->args.vc.attr.transfer = 1; + return len; default: return -1; } @@ -7273,6 +7284,7 @@ cmd_flow_parsed(const struct buffer *in) &((const struct rte_flow_shared_action_conf) { .ingress = in->args.vc.attr.ingress, .egress = in->args.vc.attr.egress, + .transfer = in->args.vc.attr.transfer, }), in->args.vc.actions); break; diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst index 289df193b..ebf7e68f8 100644 --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst @@ -4318,7 +4318,7 @@ Creating shared actions shared action ID. It is bound to ``rte_flow_shared_action_create()``:: flow shared_action {port_id} create [action_id {shared_action_id}] - [ingress] [egress] action {action} / end + [ingress] [egress] [transfer] action {action} / end If successful, it will show:: -- 2.20.1