Message ID | 20201228092520.11807-21-taoyunxiang@cmss.chinamobile.com |
---|---|
State | Not Applicable |
Headers | show
Return-Path: <ovs-dev-bounces@openvswitch.org> 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.138; helo=whitealder.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=cmss.chinamobile.com Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4D4Qcn38vpz9sVv for <incoming@patchwork.ozlabs.org>; Tue, 29 Dec 2020 05:12:25 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id ECCB486D21; Mon, 28 Dec 2020 18:12:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rw6jOuQeSWXI; Mon, 28 Dec 2020 18:12:19 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id DA78886F87; Mon, 28 Dec 2020 18:10:56 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id A8338C1DE6; Mon, 28 Dec 2020 18:10:56 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 7639EC1DA2 for <ovs-dev@openvswitch.org>; Mon, 28 Dec 2020 09:26:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5728D81BA7 for <ovs-dev@openvswitch.org>; Mon, 28 Dec 2020 09:26:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ftlx2dCtcFhU for <ovs-dev@openvswitch.org>; Mon, 28 Dec 2020 09:26:04 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from cmccmta3.chinamobile.com (cmccmta3.chinamobile.com [221.176.66.81]) by hemlock.osuosl.org (Postfix) with ESMTP id C87EA870B5 for <ovs-dev@openvswitch.org>; Mon, 28 Dec 2020 09:26:02 +0000 (UTC) Received: from spf.mail.chinamobile.com (unknown[172.16.121.3]) by rmmx-syy-dmz-app09-12009 (RichMail) with SMTP id 2ee95fe9a4940bf-bef34; Mon, 28 Dec 2020 17:25:41 +0800 (CST) X-RM-TRANSID: 2ee95fe9a4940bf-bef34 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from yun.localdomain (unknown[112.25.154.146]) by rmsmtp-syy-appsvr02-12002 (RichMail) with SMTP id 2ee25fe9a48a90b-7b875; Mon, 28 Dec 2020 17:25:40 +0800 (CST) X-RM-TRANSID: 2ee25fe9a48a90b-7b875 From: Tao YunXiang <taoyunxiang@cmss.chinamobile.com> To: ovs-dev@openvswitch.org Date: Mon, 28 Dec 2020 01:24:38 -0800 Message-Id: <20201228092520.11807-21-taoyunxiang@cmss.chinamobile.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201228092520.11807-1-taoyunxiang@cmss.chinamobile.com> References: <8> <20201228092520.11807-1-taoyunxiang@cmss.chinamobile.com> MIME-Version: 1.0 X-Mailman-Approved-At: Mon, 28 Dec 2020 18:10:33 +0000 Cc: Liuchang <liuchang@cmss.chinamobile.com> Subject: [ovs-dev] [PATCH 20/62] netdev-dpdk: Add flow_api support for netdev vports X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: <ovs-dev.openvswitch.org> List-Unsubscribe: <https://mail.openvswitch.org/mailman/options/ovs-dev>, <mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe> List-Archive: <http://mail.openvswitch.org/pipermail/ovs-dev/> List-Post: <mailto:ovs-dev@openvswitch.org> List-Help: <mailto:ovs-dev-request@openvswitch.org?subject=help> List-Subscribe: <https://mail.openvswitch.org/mailman/listinfo/ovs-dev>, <mailto:ovs-dev-request@openvswitch.org?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" <ovs-dev-bounces@openvswitch.org> |
Series |
DPDK Offload API to test
|
expand
|
diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index 7ab8186..22f7044 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -5333,6 +5333,12 @@ netdev_dpdk_flow_api_supported(struct netdev *netdev) struct netdev_dpdk *dev; bool ret = false; + if (netdev_vport_is_vport_class(netdev->netdev_class) && + !strcmp(netdev_get_dpif_type(netdev), "netdev")) { + ret = true; + goto out; + } + if (!is_dpdk_class(netdev->netdev_class)) { goto out; } diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c index 96a295f..338a272 100644 --- a/lib/netdev-offload-dpdk.c +++ b/lib/netdev-offload-dpdk.c @@ -1559,13 +1559,6 @@ netdev_offload_dpdk_flow_del(struct netdev *netdev, const ovs_u128 *ufid, static int netdev_offload_dpdk_init_flow_api(struct netdev *netdev) { - if (netdev_vport_is_vport_class(netdev->netdev_class) - && !strcmp(netdev_get_dpif_type(netdev), "system")) { - VLOG_DBG("%s: vport belongs to the system datapath. Skipping.", - netdev_get_name(netdev)); - return EOPNOTSUPP; - } - return netdev_dpdk_flow_api_supported(netdev) ? 0 : EOPNOTSUPP; }
From: Liuchang <liuchang@cmss.chinamobile.com> Code Source From: Self Code Description: Currently vport devices with dpif type "system" are rejected as part of netdev_offload_dpdk_init_flow_api() call. It is correct but we also need to specify what should be accepted. We should accept vport devices with dpif type "netdev". This commit add the acceptance of such devices to netdev_dpdk_flow_api_supported() API. This will allow any vport of type "netdev" to be considered for offloading by flow_put(). Jira: #[Optional] 市场项目编号(名称):[Optional] --- lib/netdev-dpdk.c | 6 ++++++ lib/netdev-offload-dpdk.c | 7 ------- 2 files changed, 6 insertions(+), 7 deletions(-)