Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/2218455/?format=api
{ "id": 2218455, "url": "http://patchwork.ozlabs.org/api/patches/2218455/?format=api", "web_url": "http://patchwork.ozlabs.org/project/openvswitch/patch/20260401091318.2671624-6-elibr@nvidia.com/", "project": { "id": 47, "url": "http://patchwork.ozlabs.org/api/projects/47/?format=api", "name": "Open vSwitch", "link_name": "openvswitch", "list_id": "ovs-dev.openvswitch.org", "list_email": "ovs-dev@openvswitch.org", "web_url": "http://openvswitch.org/", "scm_url": "git@github.com:openvswitch/ovs.git", "webscm_url": "https://github.com/openvswitch/ovs", "list_archive_url": "", "list_archive_url_format": "", "commit_url_format": "" }, "msgid": "<20260401091318.2671624-6-elibr@nvidia.com>", "list_archive_url": null, "date": "2026-04-01T09:13:12", "name": "[ovs-dev,v3,05/11] netdev-dpdk: Change access from dev->common.xxx to common->xxx.", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "e3c36662212b75183d97985dd29685db5a3596cf", "submitter": { "id": 79848, "url": "http://patchwork.ozlabs.org/api/people/79848/?format=api", "name": "Eli Britstein", "email": "elibr@nvidia.com" }, "delegate": { "id": 75123, "url": "http://patchwork.ozlabs.org/api/users/75123/?format=api", "username": "echaudron", "first_name": "Eelco", "last_name": "Chaudron", "email": "echaudro@redhat.com" }, "mbox": "http://patchwork.ozlabs.org/project/openvswitch/patch/20260401091318.2671624-6-elibr@nvidia.com/mbox/", "series": [ { "id": 498297, "url": "http://patchwork.ozlabs.org/api/series/498297/?format=api", "web_url": "http://patchwork.ozlabs.org/project/openvswitch/list/?series=498297", "date": "2026-04-01T09:13:07", "name": "netdev-doca", "version": 3, "mbox": "http://patchwork.ozlabs.org/series/498297/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2218455/comments/", "check": "fail", "checks": "http://patchwork.ozlabs.org/api/patches/2218455/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<ovs-dev-bounces@openvswitch.org>", "X-Original-To": [ "incoming@patchwork.ozlabs.org", "dev@openvswitch.org" ], "Delivered-To": [ "patchwork-incoming@legolas.ozlabs.org", "ovs-dev@lists.linuxfoundation.org" ], "Authentication-Results": [ "legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=dm4qcdA8;\n\tdkim-atps=neutral", "legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org\n (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org)", "smtp1.osuosl.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key,\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=dm4qcdA8", "smtp2.osuosl.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com", "smtp2.osuosl.org; dkim=pass (2048-bit key,\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=dm4qcdA8" ], "Received": [ "from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4flzqn3kpwz1yGH\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 01 Apr 2026 20:16:05 +1100 (AEDT)", "from localhost (localhost [127.0.0.1])\n\tby smtp1.osuosl.org (Postfix) with ESMTP id 1B19081E61;\n\tWed, 1 Apr 2026 09:16:04 +0000 (UTC)", "from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id xA29vXmeqwxb; Wed, 1 Apr 2026 09:16:02 +0000 (UTC)", "from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56])\n\tby smtp1.osuosl.org (Postfix) with ESMTPS id 0B8F280F1B;\n\tWed, 1 Apr 2026 09:16:02 +0000 (UTC)", "from lf-lists.osuosl.org (localhost [127.0.0.1])\n\tby lists.linuxfoundation.org (Postfix) with ESMTP id 0117DC0070;\n\tWed, 1 Apr 2026 09:16:02 +0000 (UTC)", "from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133])\n by lists.linuxfoundation.org (Postfix) with ESMTP id 6A995C003D\n for <dev@openvswitch.org>; Wed, 1 Apr 2026 09:16:01 +0000 (UTC)", "from localhost (localhost [127.0.0.1])\n by smtp2.osuosl.org (Postfix) with ESMTP id 1995440936\n for <dev@openvswitch.org>; Wed, 1 Apr 2026 09:15:23 +0000 (UTC)", "from smtp2.osuosl.org ([127.0.0.1])\n by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id zgiW1NRnfVB6 for <dev@openvswitch.org>;\n Wed, 1 Apr 2026 09:15:17 +0000 (UTC)", "from BN1PR04CU002.outbound.protection.outlook.com\n (mail-eastus2azlp170100001.outbound.protection.outlook.com\n [IPv6:2a01:111:f403:c110::1])\n by smtp2.osuosl.org (Postfix) with ESMTPS id E4F76408D6\n for <dev@openvswitch.org>; Wed, 1 Apr 2026 09:15:15 +0000 (UTC)", "from DM6PR02CA0135.namprd02.prod.outlook.com (2603:10b6:5:1b4::37)\n by DS7PR12MB8292.namprd12.prod.outlook.com (2603:10b6:8:e2::21) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.16; Wed, 1 Apr\n 2026 09:15:01 +0000", "from CY4PEPF0000E9D8.namprd05.prod.outlook.com\n (2603:10b6:5:1b4:cafe::2e) by DM6PR02CA0135.outlook.office365.com\n (2603:10b6:5:1b4::37) with Microsoft SMTP Server (version=TLS1_3,\n cipher=TLS_AES_256_GCM_SHA384) id 15.20.9745.29 via Frontend Transport; Wed,\n 1 Apr 2026 09:15:01 +0000", "from mail.nvidia.com (216.228.117.160) by\n CY4PEPF0000E9D8.mail.protection.outlook.com (10.167.241.71) with Microsoft\n SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id\n 15.20.9769.17 via Frontend Transport; Wed, 1 Apr 2026 09:15:00 +0000", "from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com\n (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Wed, 1 Apr\n 2026 02:14:41 -0700", "from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com\n (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.20; Wed, 1 Apr\n 2026 02:14:38 -0700" ], "X-Virus-Scanned": [ "amavis at osuosl.org", "amavis at osuosl.org" ], "X-Comment": "SPF check N/A for local connections - client-ip=140.211.9.56;\n helo=lists.linuxfoundation.org;\n envelope-from=ovs-dev-bounces@openvswitch.org; receiver=<UNKNOWN> ", "DKIM-Filter": [ "OpenDKIM Filter v2.11.0 smtp1.osuosl.org 0B8F280F1B", "OpenDKIM Filter v2.11.0 smtp2.osuosl.org E4F76408D6" ], "Received-SPF": [ "Pass (mailfrom) identity=mailfrom;\n client-ip=2a01:111:f403:c110::1;\n helo=bn1pr04cu002.outbound.protection.outlook.com;\n envelope-from=elibr@nvidia.com; receiver=<UNKNOWN>", "Pass (protection.outlook.com: domain of nvidia.com designates\n 216.228.117.160 as permitted sender) receiver=protection.outlook.com;\n client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C" ], "DMARC-Filter": "OpenDMARC Filter v1.4.2 smtp2.osuosl.org E4F76408D6", "ARC-Seal": "i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=CHx86bgV6lQP1LFeTiWywpRZxE0154TkeeZ1kmoVjiS1SG5n/8QjUEpBUZ3aDihmk7RjQfsq/q7k20Xn5gYz2GD0i4yHxqeQDfq+8X3GIgnxeZyj3P2xDqor8WFH+n+lLRCZNaUmQ7Ns8Bv3oI/e18J9bGb6axn3+X5+R2+sVdITRfuVyxSKdSD+c7OoZu5r/cErmYMWYx7ZnuylXLtAseahLZ++jWeSFNGpnUKcf/YXKeOVE6ff8ukmjPAUmlJPLTUCxFyxKgC+SQ4+2gQGwyu0XmweaNxzq1SDC4JBAAvhwrysY+/JV6yNkB3QwkdeRe3PQZop2b62pz/0CZxePQ==", "ARC-Message-Signature": "i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=c5+aX2uGvKpievJ2H0vGlxdMw05SsEcJwy+SsEul6Ew=;\n b=oQoLTU+9dmfFl/klMXw8SweW+RHm+M90i5cjaP4+sQQPVRHxvPtbGncm09F3LCp1Yz0q4h/mAvg6KVrjx68UQZAP8QnAhUtlvyu33CfQeqtkIY5RzKjMklRlPbqamkRUFSab4hAivIlKSvsqN8KhYq/F/bkPx4X6//YYSN6l3+0fquwv2tVVhygd8kgFv0VPhWuLY16RtanjD1RuzUzPs/WbDpYIs/Zy19v7udDcuBb0cw4SKteQNcmXKSdOFIk/xXa97QMEiXRIVeDVb/EyD74APYRuD1gwOP6dVkXbUCyl7s9ftVald0Aa6R9PNQS6lzCYo/xWmpP3UOAIEWHapA==", "ARC-Authentication-Results": "i=1; mx.microsoft.com 1; spf=pass (sender ip is\n 216.228.117.160) smtp.rcpttodomain=openvswitch.org smtp.mailfrom=nvidia.com;\n dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com;\n dkim=none (message not signed); arc=none (0)", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=c5+aX2uGvKpievJ2H0vGlxdMw05SsEcJwy+SsEul6Ew=;\n b=dm4qcdA8uNHgYOygam4sg1wGdMEDu6hK/KRXcTpj4lSIiAqQmrsGFJO2FTVTms7V5DhYLT86Gb9o9t8NJw0qbdccMWboLZmdj6QTNiPE6Mlxp0e4mNU1bwxj6DTkYUfs/Qh1emEHDxRrgjLcuqezmtYyaBPKpn+xnR1D0n0TpwXCPiEou+cIBGAfGDxIk3Op59HFwUWS1W7M35q7BtQbR0+Ia40/OwgemqGKwKyjKqXZphT4Z/Iez/V+PfktmvKlWSW8+OFCh5btuPIiS4YRL+JWbzbikXTw3uzToAufEvPWwAIdnEbl+vq2iVNTgLNx7YLlX8Qb/KJueeZ0tDUdmA==", "X-MS-Exchange-Authentication-Results": "spf=pass (sender IP is 216.228.117.160)\n smtp.mailfrom=nvidia.com;\n dkim=none (message not signed)\n header.d=none;dmarc=pass action=none header.from=nvidia.com;", "From": "Eli Britstein <elibr@nvidia.com>", "To": "<dev@openvswitch.org>", "Date": "Wed, 1 Apr 2026 12:13:12 +0300", "Message-ID": "<20260401091318.2671624-6-elibr@nvidia.com>", "X-Mailer": "git-send-email 2.34.1", "In-Reply-To": "<20260401091318.2671624-1-elibr@nvidia.com>", "References": "<20260401091318.2671624-1-elibr@nvidia.com>", "MIME-Version": "1.0", "X-Originating-IP": "[10.126.231.35]", "X-ClientProxiedBy": "rnnvmail203.nvidia.com (10.129.68.9) To\n rnnvmail201.nvidia.com (10.129.68.8)", "X-EOPAttributedMessage": "0", "X-MS-PublicTrafficType": "Email", "X-MS-TrafficTypeDiagnostic": "CY4PEPF0000E9D8:EE_|DS7PR12MB8292:EE_", "X-MS-Office365-Filtering-Correlation-Id": "76264b25-3e35-40fb-8d12-08de8fcf2704", "X-MS-Exchange-SenderADCheck": "1", "X-MS-Exchange-AntiSpam-Relay": "0", "X-Microsoft-Antispam": "BCL:0;\n ARA:13230040|82310400026|36860700016|376014|1800799024|22082099003|56012099003|18002099003;", "X-Microsoft-Antispam-Message-Info": "\n BEp40uEfdyZssKCXIWir9RQb1xEv6xfBcLuxUiLDAln9aNLiaKGp58bX3bJ54/2XQkmBJzyjXPcB82XJNRn4cQiA8dkkM0/A6OsAT3fiv8ulrqEdUgXZO5fiKBDKxV+W5PaMkib0++X4GYqF/pRCYf7p700GQYK3FN8NT9k7tJsxirPfxAoKR45gvrCZsYqXz54lSLWlSUoU0Lz5UpTEUIesRYyylcL1VdN6dENiHam27zWy3xs2BtQI4DPCOC6Kk5i4O/HjHce6c5t/rw9GOUEzU3zO/AZl14iXxi3+EsBWZBLxsA9m7ZYt/nI9le8wnSMdLi8W/Hg0yQT/HKo9vWic+KAIbv2PEvFrjgaHHwS9EuJOTUamocd/2+MDihCP5aOrOrzOELCDkjTkC71K7Sw1M2YsvJ7UdAI6MrKmyJ2pw8HeV11N8P1J+o64poS5IhHy3DixllFB7BEuABiQn6tWDbsJAh4im2yBpTporRnqB88vD5qDOY8KnY5YLGRz0BvUhETbpmAK5/h9NgK0U6+k0a0SKyoHDzYv6qNBzcNlzQHW/39uToiSAHGPaIJ1pn1CD1Wda7PVehXFRjmH7VB+nh79ucmUB9Wh8FH7m+QhzOjWnYIx1WIAdlMNFN1iiP/0QVPXZSlKoZUVlc5aulw+Tlba9HS2Teo/lylKgTTIWh7CJdkpB6r16r+Baxw1I+71b+yLA5ZejrXHZ9OA6JhPB9QCpunVhkz2K2DxvzN7LfSWA4AUL/Sr4FKg7/6yNZV/7V4cwmmj8mHwR1YGXg==", "X-Forefront-Antispam-Report": "CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1;\n SRV:;\n IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE;\n SFS:(13230040)(82310400026)(36860700016)(376014)(1800799024)(22082099003)(56012099003)(18002099003);\n DIR:OUT; SFP:1101;", "X-MS-Exchange-AntiSpam-MessageData-ChunkCount": "1", "X-MS-Exchange-AntiSpam-MessageData-0": "\n OqlJJsM4/wETgX/z/0oiNTH+ISHjTrcaRjvIqTJfwXvRg6VmxvWquxWkwUuPuXmqU/EgZG2oaUfegByvFsxDlAR4WmdTEx/gO7ecoUQx9Qx6P3Z/I4UYfAZzcOkeZiR3TQyXQmLBb6zqnKkCwoxDjeA/BYbfo3urT7pRX7C/PrvHJHijYcZcn02EgSWgeYvWAyWjuaOofKJvugjLj3fhKQMw2W9NJdBxGu9XDyJqFeCXtQFg0dVYxLmHmNLx7ywkJAOtdR7PsFOc7k8Ba5dGTfoneIx+8IQuI7NnQJhSfmsm1CLsPpxY6/DaKJmcwXpgmi2s76zmOlOPw1zH6H0vjOzLpnpWuc5XvNaj0qq2WB6Dg1yQvn998janhwkzlcLpOdUxq/ktbla2ktWbVfABCRpitU9YmVAvj3J06ffHYkpbOUydF112mo9rhn+TkW8t", "X-OriginatorOrg": "Nvidia.com", "X-MS-Exchange-CrossTenant-OriginalArrivalTime": "01 Apr 2026 09:15:00.7405 (UTC)", "X-MS-Exchange-CrossTenant-Network-Message-Id": "\n 76264b25-3e35-40fb-8d12-08de8fcf2704", "X-MS-Exchange-CrossTenant-Id": "43083d15-7273-40c1-b7db-39efd9ccc17a", "X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp": "\n TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160];\n Helo=[mail.nvidia.com]", "X-MS-Exchange-CrossTenant-AuthSource": "\n CY4PEPF0000E9D8.namprd05.prod.outlook.com", "X-MS-Exchange-CrossTenant-AuthAs": "Anonymous", "X-MS-Exchange-CrossTenant-FromEntityHeader": "HybridOnPrem", "X-MS-Exchange-Transport-CrossTenantHeadersStamped": "DS7PR12MB8292", "Subject": "[ovs-dev] [PATCH v3 05/11] netdev-dpdk: Change access from\n dev->common.xxx to common->xxx.", "X-BeenThere": "ovs-dev@openvswitch.org", "X-Mailman-Version": "2.1.30", "Precedence": "list", "List-Id": "<ovs-dev.openvswitch.org>", "List-Unsubscribe": "<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n <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>,\n <mailto:ovs-dev-request@openvswitch.org?subject=subscribe>", "Cc": "Eli Britstein <elibr@nvidia.com>, Ilya Maximets <i.maximets@ovn.org>,\n David Marchand <david.marchand@redhat.com>, Maor Dickman <maord@nvidia.com>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "ovs-dev-bounces@openvswitch.org", "Sender": "\"dev\" <ovs-dev-bounces@openvswitch.org>" }, "content": "Change function signatures to take struct netdev_dpdk_common instead of\nstruct netdev_dpdk, and update internal accesses from dev->common.xxx to\ncommon->xxx. This makes these functions reusable by netdev-doca which\nalso operates on netdev_dpdk_common.\n\nSigned-off-by: Eli Britstein <elibr@nvidia.com>\n---\n lib/netdev-dpdk.c | 456 +++++++++++++++++++++++-----------------------\n 1 file changed, 230 insertions(+), 226 deletions(-)", "diff": "diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c\nindex e34e96dd3..5167ef1b0 100644\n--- a/lib/netdev-dpdk.c\n+++ b/lib/netdev-dpdk.c\n@@ -451,8 +451,8 @@ static void netdev_dpdk_vhost_destruct(struct netdev *netdev);\n \n static int netdev_dpdk_get_sw_custom_stats(const struct netdev *,\n struct netdev_custom_stats *);\n-static void netdev_dpdk_configure_xstats(struct netdev_dpdk *dev);\n-static void netdev_dpdk_clear_xstats(struct netdev_dpdk *dev);\n+static void netdev_dpdk_configure_xstats(struct netdev_dpdk_common *common);\n+static void netdev_dpdk_clear_xstats(struct netdev_dpdk_common *common);\n \n int netdev_dpdk_get_vid(const struct netdev_dpdk *dev);\n \n@@ -865,33 +865,37 @@ netdev_dpdk_mempool_configure(struct netdev_dpdk *dev)\n }\n \n static void\n-check_link_status(struct netdev_dpdk *dev)\n+check_link_status(struct netdev_dpdk_common *common)\n {\n struct rte_eth_link link;\n \n- if (rte_eth_link_get_nowait(dev->common.port_id, &link) < 0) {\n+ if (common->port_id == DPDK_ETH_PORT_ID_INVALID) {\n+ return;\n+ }\n+\n+ if (rte_eth_link_get_nowait(common->port_id, &link) < 0) {\n VLOG_DBG_RL(&rl,\n \"Failed to retrieve link status for port \"DPDK_PORT_ID_FMT,\n- dev->common.port_id);\n+ common->port_id);\n return;\n }\n \n- if (dev->common.link.link_status != link.link_status) {\n- netdev_change_seq_changed(&dev->common.up);\n+ if (common->link.link_status != link.link_status) {\n+ netdev_change_seq_changed(&common->up);\n \n- dev->common.link_reset_cnt++;\n- dev->common.link = link;\n- if (dev->common.link.link_status) {\n+ common->link_reset_cnt++;\n+ common->link = link;\n+ if (common->link.link_status) {\n VLOG_DBG_RL(&rl,\n \"Port \"DPDK_PORT_ID_FMT\" Link Up - speed %u Mbps - %s\",\n- dev->common.port_id,\n- (unsigned) dev->common.link.link_speed,\n- (dev->common.link.link_duplex ==\n+ common->port_id,\n+ (unsigned) common->link.link_speed,\n+ (common->link.link_duplex ==\n RTE_ETH_LINK_FULL_DUPLEX)\n ? \"full-duplex\" : \"half-duplex\");\n } else {\n VLOG_DBG_RL(&rl, \"Port \"DPDK_PORT_ID_FMT\" Link Down\",\n- dev->common.port_id);\n+ common->port_id);\n }\n }\n }\n@@ -899,18 +903,16 @@ check_link_status(struct netdev_dpdk *dev)\n static void *\n dpdk_watchdog(void *dummy OVS_UNUSED)\n {\n- struct netdev_dpdk *dev;\n+ struct netdev_dpdk_common *common;\n \n pthread_detach(pthread_self());\n \n for (;;) {\n ovs_mutex_lock(&dpdk_mutex);\n- LIST_FOR_EACH (dev, common.list_node, &dpdk_list) {\n- ovs_mutex_lock(&dev->common.mutex);\n- if (dev->type == DPDK_DEV_ETH) {\n- check_link_status(dev);\n- }\n- ovs_mutex_unlock(&dev->common.mutex);\n+ LIST_FOR_EACH (common, list_node, &dpdk_list) {\n+ ovs_mutex_lock(&common->mutex);\n+ check_link_status(common);\n+ ovs_mutex_unlock(&common->mutex);\n }\n ovs_mutex_unlock(&dpdk_mutex);\n xsleep(DPDK_PORT_WATCHDOG_INTERVAL);\n@@ -920,48 +922,46 @@ dpdk_watchdog(void *dummy OVS_UNUSED)\n }\n \n static void\n-netdev_dpdk_update_netdev_flag(struct netdev_dpdk *dev,\n+netdev_dpdk_update_netdev_flag(struct netdev_dpdk_common *common,\n enum dpdk_hw_ol_features hw_ol_features,\n enum netdev_ol_flags flag)\n- OVS_REQUIRES(dev->common.mutex)\n+ OVS_REQUIRES(common->mutex)\n {\n- struct netdev *netdev = &dev->common.up;\n-\n- if (dev->common.hw_ol_features & hw_ol_features) {\n- netdev->ol_flags |= flag;\n+ if (common->hw_ol_features & hw_ol_features) {\n+ common->up.ol_flags |= flag;\n } else {\n- netdev->ol_flags &= ~flag;\n+ common->up.ol_flags &= ~flag;\n }\n }\n \n static void\n-netdev_dpdk_update_netdev_flags(struct netdev_dpdk *dev)\n- OVS_REQUIRES(dev->common.mutex)\n+netdev_dpdk_update_netdev_flags(struct netdev_dpdk_common *common)\n+ OVS_REQUIRES(common->mutex)\n {\n- netdev_dpdk_update_netdev_flag(dev, NETDEV_TX_IPV4_CKSUM_OFFLOAD,\n+ netdev_dpdk_update_netdev_flag(common, NETDEV_TX_IPV4_CKSUM_OFFLOAD,\n NETDEV_TX_OFFLOAD_IPV4_CKSUM);\n- netdev_dpdk_update_netdev_flag(dev, NETDEV_TX_TCP_CKSUM_OFFLOAD,\n+ netdev_dpdk_update_netdev_flag(common, NETDEV_TX_TCP_CKSUM_OFFLOAD,\n NETDEV_TX_OFFLOAD_TCP_CKSUM);\n- netdev_dpdk_update_netdev_flag(dev, NETDEV_TX_UDP_CKSUM_OFFLOAD,\n+ netdev_dpdk_update_netdev_flag(common, NETDEV_TX_UDP_CKSUM_OFFLOAD,\n NETDEV_TX_OFFLOAD_UDP_CKSUM);\n- netdev_dpdk_update_netdev_flag(dev, NETDEV_TX_SCTP_CKSUM_OFFLOAD,\n+ netdev_dpdk_update_netdev_flag(common, NETDEV_TX_SCTP_CKSUM_OFFLOAD,\n NETDEV_TX_OFFLOAD_SCTP_CKSUM);\n- netdev_dpdk_update_netdev_flag(dev, NETDEV_TX_TSO_OFFLOAD,\n+ netdev_dpdk_update_netdev_flag(common, NETDEV_TX_TSO_OFFLOAD,\n NETDEV_TX_OFFLOAD_TCP_TSO);\n- netdev_dpdk_update_netdev_flag(dev, NETDEV_TX_VXLAN_TNL_TSO_OFFLOAD,\n+ netdev_dpdk_update_netdev_flag(common, NETDEV_TX_VXLAN_TNL_TSO_OFFLOAD,\n NETDEV_TX_VXLAN_TNL_TSO);\n- netdev_dpdk_update_netdev_flag(dev, NETDEV_TX_GRE_TNL_TSO_OFFLOAD,\n+ netdev_dpdk_update_netdev_flag(common, NETDEV_TX_GRE_TNL_TSO_OFFLOAD,\n NETDEV_TX_GRE_TNL_TSO);\n- netdev_dpdk_update_netdev_flag(dev, NETDEV_TX_GENEVE_TNL_TSO_OFFLOAD,\n+ netdev_dpdk_update_netdev_flag(common, NETDEV_TX_GENEVE_TNL_TSO_OFFLOAD,\n NETDEV_TX_GENEVE_TNL_TSO);\n- netdev_dpdk_update_netdev_flag(dev, NETDEV_TX_OUTER_IP_CKSUM_OFFLOAD,\n+ netdev_dpdk_update_netdev_flag(common, NETDEV_TX_OUTER_IP_CKSUM_OFFLOAD,\n NETDEV_TX_OFFLOAD_OUTER_IP_CKSUM);\n- netdev_dpdk_update_netdev_flag(dev, NETDEV_TX_OUTER_UDP_CKSUM_OFFLOAD,\n+ netdev_dpdk_update_netdev_flag(common, NETDEV_TX_OUTER_UDP_CKSUM_OFFLOAD,\n NETDEV_TX_OFFLOAD_OUTER_UDP_CKSUM);\n }\n \n static int\n-dpdk_eth_dev_port_config(struct netdev_dpdk *dev,\n+dpdk_eth_dev_port_config(struct netdev_dpdk_common *common,\n const struct rte_eth_dev_info *info,\n int n_rxq, int n_txq)\n {\n@@ -974,60 +974,60 @@ dpdk_eth_dev_port_config(struct netdev_dpdk *dev,\n * scatter to support jumbo RX.\n * Setting scatter for the device is done after checking for\n * scatter support in the device capabilites. */\n- if (dev->common.mtu > RTE_ETHER_MTU) {\n- if (dev->common.hw_ol_features & NETDEV_RX_HW_SCATTER) {\n+ if (common->mtu > RTE_ETHER_MTU) {\n+ if (common->hw_ol_features & NETDEV_RX_HW_SCATTER) {\n conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_SCATTER;\n }\n }\n \n- conf.intr_conf.lsc = dev->common.lsc_interrupt_mode;\n+ conf.intr_conf.lsc = common->lsc_interrupt_mode;\n \n- if (dev->common.hw_ol_features & NETDEV_RX_CHECKSUM_OFFLOAD) {\n+ if (common->hw_ol_features & NETDEV_RX_CHECKSUM_OFFLOAD) {\n conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_CHECKSUM;\n }\n \n- if (!(dev->common.hw_ol_features & NETDEV_RX_HW_CRC_STRIP)\n+ if (!(common->hw_ol_features & NETDEV_RX_HW_CRC_STRIP)\n && info->rx_offload_capa & RTE_ETH_RX_OFFLOAD_KEEP_CRC) {\n conf.rxmode.offloads |= RTE_ETH_RX_OFFLOAD_KEEP_CRC;\n }\n \n- if (dev->common.hw_ol_features & NETDEV_TX_IPV4_CKSUM_OFFLOAD) {\n+ if (common->hw_ol_features & NETDEV_TX_IPV4_CKSUM_OFFLOAD) {\n conf.txmode.offloads |= RTE_ETH_TX_OFFLOAD_IPV4_CKSUM;\n }\n \n- if (dev->common.hw_ol_features & NETDEV_TX_TCP_CKSUM_OFFLOAD) {\n+ if (common->hw_ol_features & NETDEV_TX_TCP_CKSUM_OFFLOAD) {\n conf.txmode.offloads |= RTE_ETH_TX_OFFLOAD_TCP_CKSUM;\n }\n \n- if (dev->common.hw_ol_features & NETDEV_TX_UDP_CKSUM_OFFLOAD) {\n+ if (common->hw_ol_features & NETDEV_TX_UDP_CKSUM_OFFLOAD) {\n conf.txmode.offloads |= RTE_ETH_TX_OFFLOAD_UDP_CKSUM;\n }\n \n- if (dev->common.hw_ol_features & NETDEV_TX_SCTP_CKSUM_OFFLOAD) {\n+ if (common->hw_ol_features & NETDEV_TX_SCTP_CKSUM_OFFLOAD) {\n conf.txmode.offloads |= RTE_ETH_TX_OFFLOAD_SCTP_CKSUM;\n }\n \n- if (dev->common.hw_ol_features & NETDEV_TX_TSO_OFFLOAD) {\n+ if (common->hw_ol_features & NETDEV_TX_TSO_OFFLOAD) {\n conf.txmode.offloads |= RTE_ETH_TX_OFFLOAD_TCP_TSO;\n }\n \n- if (dev->common.hw_ol_features & NETDEV_TX_VXLAN_TNL_TSO_OFFLOAD) {\n+ if (common->hw_ol_features & NETDEV_TX_VXLAN_TNL_TSO_OFFLOAD) {\n conf.txmode.offloads |= RTE_ETH_TX_OFFLOAD_VXLAN_TNL_TSO;\n }\n \n- if (dev->common.hw_ol_features & NETDEV_TX_GENEVE_TNL_TSO_OFFLOAD) {\n+ if (common->hw_ol_features & NETDEV_TX_GENEVE_TNL_TSO_OFFLOAD) {\n conf.txmode.offloads |= RTE_ETH_TX_OFFLOAD_GENEVE_TNL_TSO;\n }\n \n- if (dev->common.hw_ol_features & NETDEV_TX_GRE_TNL_TSO_OFFLOAD) {\n+ if (common->hw_ol_features & NETDEV_TX_GRE_TNL_TSO_OFFLOAD) {\n conf.txmode.offloads |= RTE_ETH_TX_OFFLOAD_GRE_TNL_TSO;\n }\n \n- if (dev->common.hw_ol_features & NETDEV_TX_OUTER_IP_CKSUM_OFFLOAD) {\n+ if (common->hw_ol_features & NETDEV_TX_OUTER_IP_CKSUM_OFFLOAD) {\n conf.txmode.offloads |= RTE_ETH_TX_OFFLOAD_OUTER_IPV4_CKSUM;\n }\n \n- if (dev->common.hw_ol_features & NETDEV_TX_OUTER_UDP_CKSUM_OFFLOAD) {\n+ if (common->hw_ol_features & NETDEV_TX_OUTER_UDP_CKSUM_OFFLOAD) {\n conf.txmode.offloads |= RTE_ETH_TX_OFFLOAD_OUTER_UDP_CKSUM;\n }\n \n@@ -1050,38 +1050,38 @@ dpdk_eth_dev_port_config(struct netdev_dpdk *dev,\n VLOG_INFO(\"Retrying setup with (rxq:%d txq:%d)\", n_rxq, n_txq);\n }\n \n- diag = rte_eth_dev_configure(dev->common.port_id, n_rxq, n_txq, &conf);\n+ diag = rte_eth_dev_configure(common->port_id, n_rxq, n_txq, &conf);\n if (diag) {\n VLOG_WARN(\"Interface %s eth_dev setup error %s\\n\",\n- dev->common.up.name, rte_strerror(-diag));\n+ common->up.name, rte_strerror(-diag));\n break;\n }\n \n- diag = rte_eth_dev_set_mtu(dev->common.port_id, dev->common.mtu);\n+ diag = rte_eth_dev_set_mtu(common->port_id, common->mtu);\n if (diag) {\n /* A device may not support rte_eth_dev_set_mtu, in this case\n * flag a warning to the user and include the devices configured\n * MTU value that will be used instead. */\n if (-ENOTSUP == diag) {\n- rte_eth_dev_get_mtu(dev->common.port_id, &conf_mtu);\n+ rte_eth_dev_get_mtu(common->port_id, &conf_mtu);\n VLOG_WARN(\"Interface %s does not support MTU configuration, \"\n \"max packet size supported is %\"PRIu16\".\",\n- dev->common.up.name, conf_mtu);\n+ common->up.name, conf_mtu);\n } else {\n VLOG_ERR(\"Interface %s MTU (%d) setup error: %s\",\n- dev->common.up.name, dev->common.mtu,\n+ common->up.name, common->mtu,\n rte_strerror(-diag));\n break;\n }\n }\n \n for (i = 0; i < n_txq; i++) {\n- diag = rte_eth_tx_queue_setup(dev->common.port_id,\n- i, dev->common.txq_size,\n- dev->common.socket_id, NULL);\n+ diag = rte_eth_tx_queue_setup(common->port_id,\n+ i, common->txq_size,\n+ common->socket_id, NULL);\n if (diag) {\n VLOG_INFO(\"Interface %s unable to setup txq(%d): %s\",\n- dev->common.up.name, i, rte_strerror(-diag));\n+ common->up.name, i, rte_strerror(-diag));\n break;\n }\n }\n@@ -1093,13 +1093,13 @@ dpdk_eth_dev_port_config(struct netdev_dpdk *dev,\n }\n \n for (i = 0; i < n_rxq; i++) {\n- diag = rte_eth_rx_queue_setup(dev->common.port_id, i,\n- dev->common.rxq_size,\n- dev->common.socket_id, NULL,\n- dev->common.dpdk_mp->mp);\n+ diag = rte_eth_rx_queue_setup(common->port_id, i,\n+ common->rxq_size,\n+ common->socket_id, NULL,\n+ common->dpdk_mp->mp);\n if (diag) {\n VLOG_INFO(\"Interface %s unable to setup rxq(%d): %s\",\n- dev->common.up.name, i, rte_strerror(-diag));\n+ common->up.name, i, rte_strerror(-diag));\n break;\n }\n }\n@@ -1110,8 +1110,8 @@ dpdk_eth_dev_port_config(struct netdev_dpdk *dev,\n continue;\n }\n \n- dev->common.up.n_rxq = n_rxq;\n- dev->common.up.n_txq = n_txq;\n+ common->up.n_rxq = n_rxq;\n+ common->up.n_txq = n_txq;\n \n return 0;\n }\n@@ -1295,7 +1295,7 @@ dpdk_eth_dev_init(struct netdev_dpdk *dev)\n n_rxq = MIN(info.max_rx_queues, dev->common.up.n_rxq);\n n_txq = MIN(info.max_tx_queues, dev->common.up.n_txq);\n \n- diag = dpdk_eth_dev_port_config(dev, &info, n_rxq, n_txq);\n+ diag = dpdk_eth_dev_port_config(&dev->common, &info, n_rxq, n_txq);\n if (diag) {\n VLOG_ERR(\"Interface %s(rxq:%d txq:%d lsc interrupt mode:%s) \"\n \"configure error: %s\",\n@@ -1313,7 +1313,7 @@ dpdk_eth_dev_init(struct netdev_dpdk *dev)\n }\n dev->common.started = true;\n \n- netdev_dpdk_configure_xstats(dev);\n+ netdev_dpdk_configure_xstats(&dev->common);\n \n rte_eth_promiscuous_enable(dev->common.port_id);\n rte_eth_allmulticast_enable(dev->common.port_id);\n@@ -1668,7 +1668,7 @@ netdev_dpdk_destruct(struct netdev *netdev)\n }\n }\n \n- netdev_dpdk_clear_xstats(dev);\n+ netdev_dpdk_clear_xstats(&dev->common);\n free(dev->common.devargs);\n common_destruct(dev);\n \n@@ -1738,25 +1738,25 @@ netdev_dpdk_dealloc(struct netdev *netdev)\n }\n \n static void\n-netdev_dpdk_clear_xstats(struct netdev_dpdk *dev)\n- OVS_REQUIRES(dev->common.mutex)\n+netdev_dpdk_clear_xstats(struct netdev_dpdk_common *common)\n+ OVS_REQUIRES(common->mutex)\n {\n- free(dev->common.rte_xstats_names);\n- dev->common.rte_xstats_names = NULL;\n- dev->common.rte_xstats_names_size = 0;\n- free(dev->common.rte_xstats_ids);\n- dev->common.rte_xstats_ids = NULL;\n- dev->common.rte_xstats_ids_size = 0;\n+ free(common->rte_xstats_names);\n+ common->rte_xstats_names = NULL;\n+ common->rte_xstats_names_size = 0;\n+ free(common->rte_xstats_ids);\n+ common->rte_xstats_ids = NULL;\n+ common->rte_xstats_ids_size = 0;\n }\n \n static const char *\n-netdev_dpdk_get_xstat_name(struct netdev_dpdk *dev, uint64_t id)\n- OVS_REQUIRES(dev->common.mutex)\n+netdev_dpdk_get_xstat_name(struct netdev_dpdk_common *common, uint64_t id)\n+ OVS_REQUIRES(common->mutex)\n {\n- if (id >= dev->common.rte_xstats_names_size) {\n+ if (id >= common->rte_xstats_names_size) {\n return \"UNKNOWN\";\n }\n- return dev->common.rte_xstats_names[id].name;\n+ return common->rte_xstats_names[id].name;\n }\n \n static bool\n@@ -1770,8 +1770,8 @@ is_queue_stat(const char *s)\n }\n \n static void\n-netdev_dpdk_configure_xstats(struct netdev_dpdk *dev)\n- OVS_REQUIRES(dev->common.mutex)\n+netdev_dpdk_configure_xstats(struct netdev_dpdk_common *common)\n+ OVS_REQUIRES(common->mutex)\n {\n struct rte_eth_xstat_name *rte_xstats_names = NULL;\n struct rte_eth_xstat *rte_xstats = NULL;\n@@ -1780,45 +1780,45 @@ netdev_dpdk_configure_xstats(struct netdev_dpdk *dev)\n const char *name;\n uint64_t id;\n \n- netdev_dpdk_clear_xstats(dev);\n+ netdev_dpdk_clear_xstats(common);\n \n rte_xstats_names_size =\n- rte_eth_xstats_get_names(dev->common.port_id, NULL, 0);\n+ rte_eth_xstats_get_names(common->port_id, NULL, 0);\n if (rte_xstats_names_size < 0) {\n VLOG_WARN(\"Cannot get XSTATS names for port: \"DPDK_PORT_ID_FMT,\n- dev->common.port_id);\n+ common->port_id);\n goto out;\n }\n \n rte_xstats_names = xcalloc(rte_xstats_names_size,\n sizeof *rte_xstats_names);\n- rte_xstats_len = rte_eth_xstats_get_names(dev->common.port_id,\n+ rte_xstats_len = rte_eth_xstats_get_names(common->port_id,\n rte_xstats_names,\n rte_xstats_names_size);\n if (rte_xstats_len < 0 || rte_xstats_len != rte_xstats_names_size) {\n VLOG_WARN(\"Cannot get XSTATS names for port: \"DPDK_PORT_ID_FMT,\n- dev->common.port_id);\n+ common->port_id);\n goto out;\n }\n \n rte_xstats = xcalloc(rte_xstats_names_size, sizeof *rte_xstats);\n- rte_xstats_len = rte_eth_xstats_get(dev->common.port_id, rte_xstats,\n+ rte_xstats_len = rte_eth_xstats_get(common->port_id, rte_xstats,\n rte_xstats_names_size);\n if (rte_xstats_len < 0 || rte_xstats_len != rte_xstats_names_size) {\n VLOG_WARN(\"Cannot get XSTATS for port: \"DPDK_PORT_ID_FMT,\n- dev->common.port_id);\n+ common->port_id);\n goto out;\n }\n \n- dev->common.rte_xstats_names = rte_xstats_names;\n+ common->rte_xstats_names = rte_xstats_names;\n rte_xstats_names = NULL;\n- dev->common.rte_xstats_names_size = rte_xstats_names_size;\n+ common->rte_xstats_names_size = rte_xstats_names_size;\n \n- dev->common.rte_xstats_ids = xcalloc(rte_xstats_names_size,\n- sizeof *dev->common.rte_xstats_ids);\n+ common->rte_xstats_ids = xcalloc(rte_xstats_names_size,\n+ sizeof *common->rte_xstats_ids);\n for (unsigned int i = 0; i < rte_xstats_names_size; i++) {\n id = rte_xstats[i].id;\n- name = netdev_dpdk_get_xstat_name(dev, id);\n+ name = netdev_dpdk_get_xstat_name(common, id);\n \n /* For custom stats, we filter out everything except per rxq/txq basic\n * stats, and dropped, error and management counters. */\n@@ -1827,8 +1827,8 @@ netdev_dpdk_configure_xstats(struct netdev_dpdk *dev)\n strstr(name, \"_management_\") ||\n string_ends_with(name, \"_dropped\")) {\n \n- dev->common.rte_xstats_ids[dev->common.rte_xstats_ids_size] = id;\n- dev->common.rte_xstats_ids_size++;\n+ common->rte_xstats_ids[common->rte_xstats_ids_size] = id;\n+ common->rte_xstats_ids_size++;\n }\n }\n \n@@ -2054,15 +2054,16 @@ dpdk_eth_event_callback(dpdk_port_t port_id, enum rte_eth_event_type type,\n }\n \n static void\n-dpdk_set_rxq_config(struct netdev_dpdk *dev, const struct smap *args)\n- OVS_REQUIRES(dev->common.mutex)\n+dpdk_set_rxq_config(struct netdev_dpdk_common *common,\n+ const struct smap *args)\n+ OVS_REQUIRES(common->mutex)\n {\n int new_n_rxq;\n \n new_n_rxq = MAX(smap_get_int(args, \"n_rxq\", NR_QUEUE), 1);\n- if (new_n_rxq != dev->common.user_n_rxq) {\n- dev->common.user_n_rxq = new_n_rxq;\n- netdev_request_reconfigure(&dev->common.up);\n+ if (new_n_rxq != common->user_n_rxq) {\n+ common->user_n_rxq = new_n_rxq;\n+ netdev_request_reconfigure(&common->up);\n }\n }\n \n@@ -2176,7 +2177,7 @@ netdev_dpdk_set_config(struct netdev *netdev, const struct smap *args,\n \n dpdk_set_rx_steer_config(netdev, dev, args, errp);\n \n- dpdk_set_rxq_config(dev, args);\n+ dpdk_set_rxq_config(&dev->common, args);\n \n new_devargs = smap_get(args, \"dpdk-devargs\");\n \n@@ -2399,28 +2400,28 @@ netdev_dpdk_vhost_client_set_config(struct netdev *netdev,\n static int\n netdev_dpdk_get_numa_id(const struct netdev *netdev)\n {\n- struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);\n+ struct netdev_dpdk_common *common = netdev_dpdk_common_cast(netdev);\n \n- return dev->common.socket_id;\n+ return common->socket_id;\n }\n \n /* Sets the number of tx queues for the dpdk interface. */\n static int\n netdev_dpdk_set_tx_multiq(struct netdev *netdev, unsigned int n_txq)\n {\n- struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);\n+ struct netdev_dpdk_common *common = netdev_dpdk_common_cast(netdev);\n \n- ovs_mutex_lock(&dev->common.mutex);\n+ ovs_mutex_lock(&common->mutex);\n \n- if (dev->common.requested_n_txq == n_txq) {\n+ if (common->requested_n_txq == n_txq) {\n goto out;\n }\n \n- dev->common.requested_n_txq = n_txq;\n+ common->requested_n_txq = n_txq;\n netdev_request_reconfigure(netdev);\n \n out:\n- ovs_mutex_unlock(&dev->common.mutex);\n+ ovs_mutex_unlock(&common->mutex);\n return 0;\n }\n \n@@ -2492,7 +2493,8 @@ netdev_dpdk_batch_init_packet_fields(struct dp_packet_batch *batch)\n /* Prepare the packet for HWOL.\n * Return True if the packet is OK to continue. */\n static bool\n-netdev_dpdk_prep_hwol_packet(struct netdev_dpdk *dev, struct rte_mbuf *mbuf)\n+netdev_dpdk_prep_hwol_packet(struct netdev_dpdk_common *common,\n+ struct rte_mbuf *mbuf)\n {\n struct dp_packet *pkt = CONTAINER_OF(mbuf, struct dp_packet, mbuf);\n uint64_t unexpected = mbuf->ol_flags & RTE_MBUF_F_TX_OFFLOAD_MASK;\n@@ -2508,8 +2510,8 @@ netdev_dpdk_prep_hwol_packet(struct netdev_dpdk *dev, struct rte_mbuf *mbuf)\n \n if (OVS_UNLIKELY(unexpected)) {\n VLOG_WARN_RL(&rl, \"%s: Unexpected Tx offload flags: %#\"PRIx64,\n- netdev_get_name(&dev->common.up), unexpected);\n- netdev_dpdk_mbuf_dump(netdev_get_name(&dev->common.up),\n+ netdev_get_name(&common->up), unexpected);\n+ netdev_dpdk_mbuf_dump(netdev_get_name(&common->up),\n \"Packet with unexpected ol_flags\", mbuf);\n return false;\n }\n@@ -2611,11 +2613,11 @@ netdev_dpdk_prep_hwol_packet(struct netdev_dpdk *dev, struct rte_mbuf *mbuf)\n }\n \n if (OVS_UNLIKELY((hdr_len + mbuf->tso_segsz) >\n- dev->common.max_packet_len)) {\n+ common->max_packet_len)) {\n VLOG_WARN_RL(&rl, \"%s: Oversized TSO packet. hdr: %\"PRIu32\", \"\n \"gso: %\"PRIu32\", max len: %\"PRIu32\"\",\n- dev->common.up.name, hdr_len, mbuf->tso_segsz,\n- dev->common.max_packet_len);\n+ common->up.name, hdr_len, mbuf->tso_segsz,\n+ common->max_packet_len);\n return false;\n }\n mbuf->ol_flags |= RTE_MBUF_F_TX_TCP_SEG;\n@@ -2632,8 +2634,8 @@ netdev_dpdk_prep_hwol_packet(struct netdev_dpdk *dev, struct rte_mbuf *mbuf)\n /* Prepare a batch for HWOL.\n * Return the number of good packets in the batch. */\n static int\n-netdev_dpdk_prep_hwol_batch(struct netdev_dpdk *dev, struct rte_mbuf **pkts,\n- int pkt_cnt)\n+netdev_dpdk_prep_hwol_batch(struct netdev_dpdk_common *common,\n+ struct rte_mbuf **pkts, int pkt_cnt)\n {\n int i = 0;\n int cnt = 0;\n@@ -2642,7 +2644,7 @@ netdev_dpdk_prep_hwol_batch(struct netdev_dpdk *dev, struct rte_mbuf **pkts,\n /* Prepare and filter bad HWOL packets. */\n for (i = 0; i < pkt_cnt; i++) {\n pkt = pkts[i];\n- if (!netdev_dpdk_prep_hwol_packet(dev, pkt)) {\n+ if (!netdev_dpdk_prep_hwol_packet(common, pkt)) {\n rte_pktmbuf_free(pkt);\n continue;\n }\n@@ -3105,9 +3107,9 @@ dpdk_copy_dp_packet_to_mbuf(struct rte_mempool *mp, struct dp_packet *pkt_orig)\n *\n * Returns the number of good packets in the batch. */\n static size_t\n-dpdk_copy_batch_to_mbuf(struct netdev *netdev, struct dp_packet_batch *batch)\n+dpdk_copy_batch_to_mbuf(struct netdev_dpdk_common *common,\n+ struct dp_packet_batch *batch)\n {\n- struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);\n size_t i, size = dp_packet_batch_size(batch);\n struct dp_packet *packet;\n \n@@ -3118,7 +3120,7 @@ dpdk_copy_batch_to_mbuf(struct netdev *netdev, struct dp_packet_batch *batch)\n struct dp_packet *pktcopy;\n \n pktcopy = dpdk_copy_dp_packet_to_mbuf(\n- dev->common.dpdk_mp->mp, packet);\n+ common->dpdk_mp->mp, packet);\n if (pktcopy) {\n dp_packet_batch_refill(batch, pktcopy, i);\n }\n@@ -3151,7 +3153,7 @@ netdev_dpdk_common_send(struct netdev *netdev, struct dp_packet_batch *batch,\n \n /* Copy dp-packets to mbufs. */\n if (OVS_UNLIKELY(need_copy)) {\n- cnt = dpdk_copy_batch_to_mbuf(netdev, batch);\n+ cnt = dpdk_copy_batch_to_mbuf(&dev->common, batch);\n stats->tx_failure_drops += pkt_cnt - cnt;\n pkt_cnt = cnt;\n }\n@@ -3163,7 +3165,7 @@ netdev_dpdk_common_send(struct netdev *netdev, struct dp_packet_batch *batch,\n \n if (netdev->ol_flags) {\n /* Prepare each mbuf for hardware offloading. */\n- cnt = netdev_dpdk_prep_hwol_batch(dev, pkts, pkt_cnt);\n+ cnt = netdev_dpdk_prep_hwol_batch(&dev->common, pkts, pkt_cnt);\n stats->tx_invalid_hwol_drops += pkt_cnt - cnt;\n pkt_cnt = cnt;\n }\n@@ -3310,19 +3312,20 @@ static int\n netdev_dpdk_set_etheraddr__(struct netdev_dpdk *dev, const struct eth_addr mac)\n OVS_REQUIRES(dev->common.mutex)\n {\n+ struct netdev_dpdk_common *common = &dev->common;\n int err = 0;\n \n if (dev->type == DPDK_DEV_ETH) {\n struct rte_ether_addr ea;\n \n memcpy(ea.addr_bytes, mac.ea, ETH_ADDR_LEN);\n- err = -rte_eth_dev_default_mac_addr_set(dev->common.port_id, &ea);\n+ err = -rte_eth_dev_default_mac_addr_set(common->port_id, &ea);\n }\n if (!err) {\n- dev->common.hwaddr = mac;\n+ common->hwaddr = mac;\n } else {\n VLOG_WARN(\"%s: Failed to set requested mac(\"ETH_ADDR_FMT\"): %s\",\n- netdev_get_name(&dev->common.up), ETH_ADDR_ARGS(mac),\n+ netdev_get_name(&common->up), ETH_ADDR_ARGS(mac),\n rte_strerror(err));\n }\n \n@@ -3350,11 +3353,11 @@ netdev_dpdk_set_etheraddr(struct netdev *netdev, const struct eth_addr mac)\n static int\n netdev_dpdk_get_etheraddr(const struct netdev *netdev, struct eth_addr *mac)\n {\n- struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);\n+ struct netdev_dpdk_common *common = netdev_dpdk_common_cast(netdev);\n \n- ovs_mutex_lock(&dev->common.mutex);\n- *mac = dev->common.hwaddr;\n- ovs_mutex_unlock(&dev->common.mutex);\n+ ovs_mutex_lock(&common->mutex);\n+ *mac = common->hwaddr;\n+ ovs_mutex_unlock(&common->mutex);\n \n return 0;\n }\n@@ -3362,11 +3365,11 @@ netdev_dpdk_get_etheraddr(const struct netdev *netdev, struct eth_addr *mac)\n static int\n netdev_dpdk_get_mtu(const struct netdev *netdev, int *mtup)\n {\n- struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);\n+ struct netdev_dpdk_common *common = netdev_dpdk_common_cast(netdev);\n \n- ovs_mutex_lock(&dev->common.mutex);\n- *mtup = dev->common.mtu;\n- ovs_mutex_unlock(&dev->common.mutex);\n+ ovs_mutex_lock(&common->mutex);\n+ *mtup = common->mtu;\n+ ovs_mutex_unlock(&common->mutex);\n \n return 0;\n }\n@@ -3753,29 +3756,29 @@ netdev_dpdk_get_carrier(const struct netdev *netdev, bool *carrier);\n static int\n netdev_dpdk_get_stats(const struct netdev *netdev, struct netdev_stats *stats)\n {\n- struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);\n+ struct netdev_dpdk_common *common = netdev_dpdk_common_cast(netdev);\n struct rte_eth_stats rte_stats;\n bool gg;\n \n netdev_dpdk_get_carrier(netdev, &gg);\n- ovs_mutex_lock(&dev->common.mutex);\n+ ovs_mutex_lock(&common->mutex);\n \n struct rte_eth_xstat *rte_xstats = NULL;\n struct rte_eth_xstat_name *rte_xstats_names = NULL;\n int rte_xstats_len, rte_xstats_new_len, rte_xstats_ret;\n \n- if (rte_eth_stats_get(dev->common.port_id, &rte_stats)) {\n+ if (rte_eth_stats_get(common->port_id, &rte_stats)) {\n VLOG_ERR(\"Can't get ETH statistics for port: \"DPDK_PORT_ID_FMT,\n- dev->common.port_id);\n- ovs_mutex_unlock(&dev->common.mutex);\n+ common->port_id);\n+ ovs_mutex_unlock(&common->mutex);\n return EPROTO;\n }\n \n /* Get length of statistics */\n- rte_xstats_len = rte_eth_xstats_get_names(dev->common.port_id, NULL, 0);\n+ rte_xstats_len = rte_eth_xstats_get_names(common->port_id, NULL, 0);\n if (rte_xstats_len < 0) {\n VLOG_WARN(\"Cannot get XSTATS values for port: \"DPDK_PORT_ID_FMT,\n- dev->common.port_id);\n+ common->port_id);\n goto out;\n }\n /* Reserve memory for xstats names and values */\n@@ -3783,24 +3786,24 @@ netdev_dpdk_get_stats(const struct netdev *netdev, struct netdev_stats *stats)\n rte_xstats = xcalloc(rte_xstats_len, sizeof *rte_xstats);\n \n /* Retreive xstats names */\n- rte_xstats_new_len = rte_eth_xstats_get_names(dev->common.port_id,\n+ rte_xstats_new_len = rte_eth_xstats_get_names(common->port_id,\n rte_xstats_names,\n rte_xstats_len);\n if (rte_xstats_new_len != rte_xstats_len) {\n VLOG_WARN(\"Cannot get XSTATS names for port: \"DPDK_PORT_ID_FMT,\n- dev->common.port_id);\n+ common->port_id);\n goto out;\n }\n /* Retreive xstats values */\n memset(rte_xstats, 0xff, sizeof *rte_xstats * rte_xstats_len);\n- rte_xstats_ret = rte_eth_xstats_get(dev->common.port_id, rte_xstats,\n+ rte_xstats_ret = rte_eth_xstats_get(common->port_id, rte_xstats,\n rte_xstats_len);\n if (rte_xstats_ret > 0 && rte_xstats_ret <= rte_xstats_len) {\n netdev_dpdk_convert_xstats(stats, rte_xstats, rte_xstats_names,\n rte_xstats_len);\n } else {\n VLOG_WARN(\"Cannot get XSTATS values for port: \"DPDK_PORT_ID_FMT,\n- dev->common.port_id);\n+ common->port_id);\n }\n \n out:\n@@ -3814,17 +3817,17 @@ out:\n stats->rx_errors = rte_stats.ierrors;\n stats->tx_errors = rte_stats.oerrors;\n \n- rte_spinlock_lock(&dev->common.stats_lock);\n- stats->tx_dropped = dev->common.stats.tx_dropped;\n- stats->rx_dropped = dev->common.stats.rx_dropped;\n- rte_spinlock_unlock(&dev->common.stats_lock);\n+ rte_spinlock_lock(&common->stats_lock);\n+ stats->tx_dropped = common->stats.tx_dropped;\n+ stats->rx_dropped = common->stats.rx_dropped;\n+ rte_spinlock_unlock(&common->stats_lock);\n \n /* These are the available DPDK counters for packets not received due to\n * local resource constraints in DPDK and NIC respectively. */\n stats->rx_dropped += rte_stats.rx_nombuf + rte_stats.imissed;\n stats->rx_missed_errors = rte_stats.imissed;\n \n- ovs_mutex_unlock(&dev->common.mutex);\n+ ovs_mutex_unlock(&common->mutex);\n \n return 0;\n }\n@@ -3833,27 +3836,26 @@ static int\n netdev_dpdk_get_custom_stats(const struct netdev *netdev,\n struct netdev_custom_stats *custom_stats)\n {\n-\n- uint32_t i;\n- struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);\n+ struct netdev_dpdk_common *common = netdev_dpdk_common_cast(netdev);\n int rte_xstats_ret, sw_stats_size;\n+ uint32_t i;\n \n netdev_dpdk_get_sw_custom_stats(netdev, custom_stats);\n \n- ovs_mutex_lock(&dev->common.mutex);\n+ ovs_mutex_lock(&common->mutex);\n \n- if (dev->common.rte_xstats_ids_size > 0) {\n- uint64_t *values = xcalloc(dev->common.rte_xstats_ids_size,\n+ if (common->rte_xstats_ids_size > 0) {\n+ uint64_t *values = xcalloc(common->rte_xstats_ids_size,\n sizeof(uint64_t));\n \n rte_xstats_ret =\n- rte_eth_xstats_get_by_id(dev->common.port_id,\n- dev->common.rte_xstats_ids,\n+ rte_eth_xstats_get_by_id(common->port_id,\n+ common->rte_xstats_ids,\n values,\n- dev->common.rte_xstats_ids_size);\n+ common->rte_xstats_ids_size);\n \n if (rte_xstats_ret > 0 &&\n- rte_xstats_ret <= dev->common.rte_xstats_ids_size) {\n+ rte_xstats_ret <= common->rte_xstats_ids_size) {\n \n sw_stats_size = custom_stats->size;\n custom_stats->size += rte_xstats_ret;\n@@ -3864,19 +3866,19 @@ netdev_dpdk_get_custom_stats(const struct netdev *netdev,\n for (i = 0; i < rte_xstats_ret; i++) {\n ovs_strlcpy(custom_stats->counters[sw_stats_size + i].name,\n netdev_dpdk_get_xstat_name(\n- dev, dev->common.rte_xstats_ids[i]),\n+ common, common->rte_xstats_ids[i]),\n NETDEV_CUSTOM_STATS_NAME_SIZE);\n custom_stats->counters[sw_stats_size + i].value = values[i];\n }\n } else {\n VLOG_WARN(\"Cannot get XSTATS values for port: \"DPDK_PORT_ID_FMT,\n- dev->common.port_id);\n+ common->port_id);\n }\n \n free(values);\n }\n \n- ovs_mutex_unlock(&dev->common.mutex);\n+ ovs_mutex_unlock(&common->mutex);\n \n return 0;\n }\n@@ -3938,13 +3940,13 @@ netdev_dpdk_get_features(const struct netdev *netdev,\n enum netdev_features *supported,\n enum netdev_features *peer)\n {\n- struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);\n+ struct netdev_dpdk_common *common = netdev_dpdk_common_cast(netdev);\n struct rte_eth_link link;\n uint32_t feature = 0;\n \n- ovs_mutex_lock(&dev->common.mutex);\n- link = dev->common.link;\n- ovs_mutex_unlock(&dev->common.mutex);\n+ ovs_mutex_lock(&common->mutex);\n+ link = common->link;\n+ ovs_mutex_unlock(&common->mutex);\n \n /* Match against OpenFlow defined link speed values. */\n if (link.link_duplex == RTE_ETH_LINK_FULL_DUPLEX) {\n@@ -4000,15 +4002,15 @@ static int\n netdev_dpdk_get_speed(const struct netdev *netdev, uint32_t *current,\n uint32_t *max)\n {\n- struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);\n+ struct netdev_dpdk_common *common = netdev_dpdk_common_cast(netdev);\n struct rte_eth_dev_info dev_info;\n struct rte_eth_link link;\n int diag;\n \n- ovs_mutex_lock(&dev->common.mutex);\n- link = dev->common.link;\n- diag = rte_eth_dev_info_get(dev->common.port_id, &dev_info);\n- ovs_mutex_unlock(&dev->common.mutex);\n+ ovs_mutex_lock(&common->mutex);\n+ link = common->link;\n+ diag = rte_eth_dev_info_get(common->port_id, &dev_info);\n+ ovs_mutex_unlock(&common->mutex);\n \n *current = link.link_speed != RTE_ETH_SPEED_NUM_UNKNOWN\n ? link.link_speed : 0;\n@@ -4155,14 +4157,14 @@ netdev_dpdk_set_policing(struct netdev* netdev, uint32_t policer_rate,\n static int\n netdev_dpdk_get_ifindex(const struct netdev *netdev)\n {\n- struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);\n+ struct netdev_dpdk_common *common = netdev_dpdk_common_cast(netdev);\n \n- ovs_mutex_lock(&dev->common.mutex);\n+ ovs_mutex_lock(&common->mutex);\n /* Calculate hash from the netdev name. Ensure that ifindex is a 24-bit\n * postive integer to meet RFC 2863 recommendations.\n */\n int ifindex = hash_string(netdev->name, 0) % 0xfffffe + 1;\n- ovs_mutex_unlock(&dev->common.mutex);\n+ ovs_mutex_unlock(&common->mutex);\n \n return ifindex;\n }\n@@ -4170,13 +4172,13 @@ netdev_dpdk_get_ifindex(const struct netdev *netdev)\n static int\n netdev_dpdk_get_carrier(const struct netdev *netdev, bool *carrier)\n {\n- struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);\n+ struct netdev_dpdk_common *common = netdev_dpdk_common_cast(netdev);\n \n- ovs_mutex_lock(&dev->common.mutex);\n- check_link_status(dev);\n- *carrier = dev->common.link.link_status;\n+ ovs_mutex_lock(&common->mutex);\n+ check_link_status(common);\n+ *carrier = common->link.link_status;\n \n- ovs_mutex_unlock(&dev->common.mutex);\n+ ovs_mutex_unlock(&common->mutex);\n \n return 0;\n }\n@@ -4202,12 +4204,12 @@ netdev_dpdk_vhost_get_carrier(const struct netdev *netdev, bool *carrier)\n static long long int\n netdev_dpdk_get_carrier_resets(const struct netdev *netdev)\n {\n- struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);\n+ struct netdev_dpdk_common *common = netdev_dpdk_common_cast(netdev);\n long long int carrier_resets;\n \n- ovs_mutex_lock(&dev->common.mutex);\n- carrier_resets = dev->common.link_reset_cnt;\n- ovs_mutex_unlock(&dev->common.mutex);\n+ ovs_mutex_lock(&common->mutex);\n+ carrier_resets = common->link_reset_cnt;\n+ ovs_mutex_unlock(&common->mutex);\n \n return carrier_resets;\n }\n@@ -4225,15 +4227,17 @@ netdev_dpdk_update_flags__(struct netdev_dpdk *dev,\n enum netdev_flags *old_flagsp)\n OVS_REQUIRES(dev->common.mutex)\n {\n+ struct netdev_dpdk_common *common = &dev->common;\n+\n if ((off | on) & ~(NETDEV_UP | NETDEV_PROMISC)) {\n return EINVAL;\n }\n \n- *old_flagsp = dev->common.flags;\n- dev->common.flags |= on;\n- dev->common.flags &= ~off;\n+ *old_flagsp = common->flags;\n+ common->flags |= on;\n+ common->flags &= ~off;\n \n- if (dev->common.flags == *old_flagsp) {\n+ if (common->flags == *old_flagsp) {\n return 0;\n }\n \n@@ -4242,27 +4246,27 @@ netdev_dpdk_update_flags__(struct netdev_dpdk *dev,\n if ((dev->common.flags ^ *old_flagsp) & NETDEV_UP) {\n int err;\n \n- if (dev->common.flags & NETDEV_UP) {\n- err = rte_eth_dev_set_link_up(dev->common.port_id);\n+ if (common->flags & NETDEV_UP) {\n+ err = rte_eth_dev_set_link_up(common->port_id);\n } else {\n- err = rte_eth_dev_set_link_down(dev->common.port_id);\n+ err = rte_eth_dev_set_link_down(common->port_id);\n }\n if (err == -ENOTSUP) {\n VLOG_INFO(\"Interface %s does not support link state \"\n- \"configuration\", netdev_get_name(&dev->common.up));\n+ \"configuration\", netdev_get_name(&common->up));\n } else if (err < 0) {\n VLOG_ERR(\"Interface %s link change error: %s\",\n- netdev_get_name(&dev->common.up), rte_strerror(-err));\n- dev->common.flags = *old_flagsp;\n+ netdev_get_name(&common->up), rte_strerror(-err));\n+ common->flags = *old_flagsp;\n return -err;\n }\n }\n \n- if (dev->common.flags & NETDEV_PROMISC) {\n- rte_eth_promiscuous_enable(dev->common.port_id);\n+ if (common->flags & NETDEV_PROMISC) {\n+ rte_eth_promiscuous_enable(common->port_id);\n }\n \n- netdev_change_seq_changed(&dev->common.up);\n+ netdev_change_seq_changed(&common->up);\n } else {\n /* If DPDK_DEV_VHOST device's NETDEV_UP flag was changed and vhost is\n * running then change netdev's change_seq to trigger link state\n@@ -4270,15 +4274,14 @@ netdev_dpdk_update_flags__(struct netdev_dpdk *dev,\n \n if ((NETDEV_UP & ((*old_flagsp ^ on) | (*old_flagsp ^ off)))\n && is_vhost_running(dev)) {\n- netdev_change_seq_changed(&dev->common.up);\n+ netdev_change_seq_changed(&common->up);\n \n /* Clear statistics if device is getting up. */\n if (NETDEV_UP & on) {\n- rte_spinlock_lock(&dev->common.stats_lock);\n- memset(&dev->common.stats, 0, sizeof dev->common.stats);\n- memset(dev->common.sw_stats, 0,\n- sizeof *dev->common.sw_stats);\n- rte_spinlock_unlock(&dev->common.stats_lock);\n+ rte_spinlock_lock(&common->stats_lock);\n+ memset(&common->stats, 0, sizeof common->stats);\n+ memset(common->sw_stats, 0, sizeof *common->sw_stats);\n+ rte_spinlock_unlock(&common->stats_lock);\n }\n }\n }\n@@ -4394,6 +4397,7 @@ netdev_dpdk_link_speed_to_str__(uint32_t link_speed)\n static int\n netdev_dpdk_get_status(const struct netdev *netdev, struct smap *args)\n {\n+ struct netdev_dpdk_common *common = netdev_dpdk_common_cast(netdev);\n struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);\n struct rte_eth_dev_info dev_info;\n size_t rx_steer_flows_num;\n@@ -4402,28 +4406,28 @@ netdev_dpdk_get_status(const struct netdev *netdev, struct smap *args)\n int n_rxq;\n int diag;\n \n- if (!rte_eth_dev_is_valid_port(dev->common.port_id)) {\n+ if (!rte_eth_dev_is_valid_port(common->port_id)) {\n return ENODEV;\n }\n \n ovs_mutex_lock(&dpdk_mutex);\n- ovs_mutex_lock(&dev->common.mutex);\n- diag = rte_eth_dev_info_get(dev->common.port_id, &dev_info);\n- link_speed = dev->common.link.link_speed;\n+ ovs_mutex_lock(&common->mutex);\n+ diag = rte_eth_dev_info_get(common->port_id, &dev_info);\n+ link_speed = common->link.link_speed;\n rx_steer_flags = dev->rx_steer_flags;\n rx_steer_flows_num = dev->rx_steer_flows_num;\n n_rxq = netdev->n_rxq;\n- ovs_mutex_unlock(&dev->common.mutex);\n+ ovs_mutex_unlock(&common->mutex);\n ovs_mutex_unlock(&dpdk_mutex);\n \n- smap_add_format(args, \"port_no\", DPDK_PORT_ID_FMT, dev->common.port_id);\n+ smap_add_format(args, \"port_no\", DPDK_PORT_ID_FMT, common->port_id);\n smap_add_format(args, \"numa_id\", \"%d\",\n- rte_eth_dev_socket_id(dev->common.port_id));\n+ rte_eth_dev_socket_id(common->port_id));\n if (!diag) {\n smap_add_format(args, \"driver_name\", \"%s\", dev_info.driver_name);\n smap_add_format(args, \"min_rx_bufsize\", \"%u\", dev_info.min_rx_bufsize);\n }\n- smap_add_format(args, \"max_rx_pktlen\", \"%u\", dev->common.max_packet_len);\n+ smap_add_format(args, \"max_rx_pktlen\", \"%u\", common->max_packet_len);\n if (!diag) {\n smap_add_format(args, \"max_rx_queues\", \"%u\", dev_info.max_rx_queues);\n smap_add_format(args, \"max_tx_queues\", \"%u\", dev_info.max_tx_queues);\n@@ -4438,7 +4442,7 @@ netdev_dpdk_get_status(const struct netdev *netdev, struct smap *args)\n smap_add_format(args, \"n_txq\", \"%d\", netdev->n_txq);\n \n smap_add(args, \"rx_csum_offload\",\n- dev->common.hw_ol_features & NETDEV_RX_CHECKSUM_OFFLOAD\n+ common->hw_ol_features & NETDEV_RX_CHECKSUM_OFFLOAD\n ? \"true\" : \"false\");\n \n /* Querying the DPDK library for iftype may be done in future, pending\n@@ -4464,9 +4468,9 @@ netdev_dpdk_get_status(const struct netdev *netdev, struct smap *args)\n smap_add(args, \"link_speed\",\n netdev_dpdk_link_speed_to_str__(link_speed));\n \n- if (dev->common.is_representor) {\n+ if (common->is_representor) {\n smap_add_format(args, \"dpdk-vf-mac\", ETH_ADDR_FMT,\n- ETH_ADDR_ARGS(dev->common.hwaddr));\n+ ETH_ADDR_ARGS(common->hwaddr));\n }\n \n if (rx_steer_flags && !rx_steer_flows_num) {\n@@ -4817,7 +4821,7 @@ new_device(int vid)\n }\n }\n \n- netdev_dpdk_update_netdev_flags(dev);\n+ netdev_dpdk_update_netdev_flags(&dev->common);\n \n ovsrcu_index_set(&dev->vid, vid);\n exists = true;\n@@ -4884,7 +4888,7 @@ destroy_device(int vid)\n \n /* Clear offload capabilities before next new_device. */\n dev->common.hw_ol_features = 0;\n- netdev_dpdk_update_netdev_flags(dev);\n+ netdev_dpdk_update_netdev_flags(&dev->common);\n \n netdev_change_seq_changed(&dev->common.up);\n ovs_mutex_unlock(&dev->common.mutex);\n@@ -6160,7 +6164,7 @@ retry:\n if (err) {\n goto out;\n }\n- netdev_dpdk_update_netdev_flags(dev);\n+ netdev_dpdk_update_netdev_flags(&dev->common);\n \n /* If both requested and actual hwaddr were previously\n * unset (initialized to 0), then first device init above\n@@ -6245,7 +6249,7 @@ dpdk_vhost_reconfigure_helper(struct netdev_dpdk *dev)\n }\n }\n \n- netdev_dpdk_update_netdev_flags(dev);\n+ netdev_dpdk_update_netdev_flags(&dev->common);\n \n return 0;\n }\n", "prefixes": [ "ovs-dev", "v3", "05/11" ] }