From patchwork Wed Dec 18 14:41:07 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eli Britstein X-Patchwork-Id: 1212476 X-Patchwork-Delegate: i.maximets@samsung.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=mellanox.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47dHlR4Dzsz9sP3 for ; Thu, 19 Dec 2019 01:41:55 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id B27A186B2C; Wed, 18 Dec 2019 14:41:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f0HsqyJX61lW; Wed, 18 Dec 2019 14:41:49 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 424B586C2C; Wed, 18 Dec 2019 14:41:35 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 1E9F9C1D81; Wed, 18 Dec 2019 14:41:35 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2DBEBC077D for ; Wed, 18 Dec 2019 14:41:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 12EA12048E for ; Wed, 18 Dec 2019 14:41:28 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ib56M2XY+V-Q for ; Wed, 18 Dec 2019 14:41:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by silver.osuosl.org (Postfix) with ESMTP id C925F228AC for ; Wed, 18 Dec 2019 14:41:25 +0000 (UTC) Received: from Internal Mail-Server by MTLPINE1 (envelope-from elibr@mellanox.com) with ESMTPS (AES256-SHA encrypted); 18 Dec 2019 16:41:23 +0200 Received: from dev-r-vrt-215.mtr.labs.mlnx. (dev-r-vrt-215.mtr.labs.mlnx [10.212.215.1]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id xBIEfMm4027222; Wed, 18 Dec 2019 16:41:23 +0200 From: Eli Britstein To: dev@openvswitch.org, Ilya Maximets Date: Wed, 18 Dec 2019 14:41:07 +0000 Message-Id: <20191218144110.18653-16-elibr@mellanox.com> X-Mailer: git-send-email 2.14.5 In-Reply-To: <20191218144110.18653-1-elibr@mellanox.com> References: <20191218144110.18653-1-elibr@mellanox.com> Cc: Oz Shlomo , Simon Horman , Majd Dibbiny , Eli Britstein , Ameer Mahagneh Subject: [ovs-dev] [PATCH V5 15/18] netdev-offload-dpdk: Support offload of drop action X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Signed-off-by: Eli Britstein Reviewed-by: Oz Shlomo --- Documentation/howto/dpdk.rst | 1 + NEWS | 2 +- lib/netdev-offload-dpdk.c | 5 +++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Documentation/howto/dpdk.rst b/Documentation/howto/dpdk.rst index f0fe2bef7..d9de7bedd 100644 --- a/Documentation/howto/dpdk.rst +++ b/Documentation/howto/dpdk.rst @@ -391,6 +391,7 @@ Supported protocols for hardware offload matches are: Supported actions for hardware offload are: - Output. +- Drop. Further Reading --------------- diff --git a/NEWS b/NEWS index 8b8bcab9a..d66656df8 100644 --- a/NEWS +++ b/NEWS @@ -26,7 +26,7 @@ Post-v2.12.0 * DPDK ring ports (dpdkr) are deprecated and will be removed in next releases. * Add support for DPDK 19.11. - * Add hardware offload support for output actions (experimental). + * Add hardware offload support for output and drop actions (experimental). - 'ovs-appctl dpctl/dump-flows' can now show offloaded=partial for partially offloaded flows, dp:dpdk for fully offloaded by dpdk, and type filter supports new filters: "dpdk" and "partially-offloaded". diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c index 6b3ca9f7d..295aa6b9d 100644 --- a/lib/netdev-offload-dpdk.c +++ b/lib/netdev-offload-dpdk.c @@ -367,6 +367,8 @@ dump_flow_action(struct ds *s, const struct rte_flow_action *actions) } else { ds_put_cstr(s, " Port-id = null\n"); } + } else if (actions->type == RTE_FLOW_ACTION_TYPE_DROP) { + ds_put_cstr(s, "rte flow drop action\n"); } else { ds_put_format(s, "unknown rte flow action (%d)\n", actions->type); } @@ -812,8 +814,7 @@ parse_flow_actions(struct netdev *netdev, } if (nl_actions_len == 0) { - VLOG_DBG_RL(&rl, "Unsupported action type drop"); - return -1; + add_flow_action(actions, RTE_FLOW_ACTION_TYPE_DROP, NULL); } add_flow_action(actions, RTE_FLOW_ACTION_TYPE_END, NULL);