From patchwork Fri Jul 23 14:24:12 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Gray X-Patchwork-Id: 12396171 X-Patchwork-Delegate: kuba@kernel.org 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=-20.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 8C014C4320A for ; Fri, 23 Jul 2021 14:24:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4B1A860F43 for ; Fri, 23 Jul 2021 14:24:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235389AbhGWNoK (ORCPT ); Fri, 23 Jul 2021 09:44:10 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:24596 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235351AbhGWNnv (ORCPT ); Fri, 23 Jul 2021 09:43:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627050264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=LgEGRf0r9pG6iGueMngVEeX6+gNDsBolpxeUHq/dBWY=; b=MlWK9enDEUVwaEpVz8QJmfDQ+0vrzAnhD+fhA4HotsWnvdI/Z+4uCd8H/fXJUimKdK/wA8 gi9UV+H+MK537wrVSpqodmcHQRD3EFQ0H6QFAePKNcawpFFLh/5zWaj04IXS/dqhj2EjUw lb3aDjXDkTNeG4Lqz30/9UmvG11BE2I= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-426-6HDV_Ld0O4Knsvl6k8HOiA-1; Fri, 23 Jul 2021 10:24:21 -0400 X-MC-Unique: 6HDV_Ld0O4Knsvl6k8HOiA-1 Received: by mail-wr1-f72.google.com with SMTP id s8-20020a5d42480000b02901404c442853so1045075wrr.12 for ; Fri, 23 Jul 2021 07:24:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LgEGRf0r9pG6iGueMngVEeX6+gNDsBolpxeUHq/dBWY=; b=EGhdXr7tAdOR80wa+hwmKejnfn1Bc2dWbQG4azJXTh731Co0eoNXW9bW7q+UUFrv+f GscQc6NeVqmyvgYhVR3T+RlHi3FzyiA7hKKRZNeCUNyPsSsmT1TNOcI70uE/GNQRlWGT OicgT+i3rxnm/FfvXp60zTjWrG5yCyaajst96O5lMZOKGUXEUOed6jBEvzJcxIcMbvns PKRYO5V96YSeFvgmGOf894Sn1N/tKhKBVcibAy5Efv8BwGMy1sBMS/Hu9Ok70Q87WvIp Ahbt2YickfzHyRWsJYRlcEY3+0zwD8UpMLbldGZZqhz4XNvZ2T8hL64W3L3B9EVhHeF2 Mf/Q== X-Gm-Message-State: AOAM5327whKXBFj4AmGrf2i0In8eJ4QrhlEpP4/wcaYt96iTo1LcNfPa bTwgWzjSy4RMDLRAveycZPUw2F9ODK+TAS+Sq3CCYdF+Eu2wJ3J/r1rPdJjyQ1l/KFmPzp2LNgx F/T6Y7Lg7HDQGsLCaMg/bZz3CnRIvw9AivXz7lHQeXvVTxj4t3pBno9XC7pWOBr7v4Q5lGodP X-Received: by 2002:a05:600c:198f:: with SMTP id t15mr2991848wmq.60.1627050259836; Fri, 23 Jul 2021 07:24:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDijy+ap2y/5URC3wgY6NeZfXoUcXHiZHxJ8JounJ/mno/fnufOwj8SJXCA+qzUV+6c0HhRA== X-Received: by 2002:a05:600c:198f:: with SMTP id t15mr2991829wmq.60.1627050259650; Fri, 23 Jul 2021 07:24:19 -0700 (PDT) Received: from wsfd-netdev76.ntdv.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id p2sm27182180wmg.6.2021.07.23.07.24.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jul 2021 07:24:19 -0700 (PDT) From: Mark Gray To: netdev@vger.kernel.org, dev@openvswitch.org Cc: pshelar@ovn.org, davem@davemloft.net, kuba@kernel.org, Mark Gray Subject: [PATCH net-next 1/3] openvswitch: update kdoc OVS_DP_ATTR_PER_CPU_PIDS Date: Fri, 23 Jul 2021 10:24:12 -0400 Message-Id: <20210723142414.55267-2-mark.d.gray@redhat.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210723142414.55267-1-mark.d.gray@redhat.com> References: <20210723142414.55267-1-mark.d.gray@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Signed-off-by: Mark Gray --- include/uapi/linux/openvswitch.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index 6571b57b2268..0e436a3755f1 100644 --- a/include/uapi/linux/openvswitch.h +++ b/include/uapi/linux/openvswitch.h @@ -70,7 +70,7 @@ enum ovs_datapath_cmd { * set on the datapath port (for OVS_ACTION_ATTR_MISS). Only valid on * %OVS_DP_CMD_NEW requests. A value of zero indicates that upcalls should * not be sent. - * OVS_DP_ATTR_PER_CPU_PIDS: Per-cpu array of PIDs for upcalls when + * @OVS_DP_ATTR_PER_CPU_PIDS: Per-cpu array of PIDs for upcalls when * OVS_DP_F_DISPATCH_UPCALL_PER_CPU feature is set. * @OVS_DP_ATTR_STATS: Statistics about packets that have passed through the * datapath. Always present in notifications. From patchwork Fri Jul 23 14:24:13 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Gray X-Patchwork-Id: 12396169 X-Patchwork-Delegate: kuba@kernel.org 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=-20.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 7F1ABC4338F for ; Fri, 23 Jul 2021 14:24:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3E31F60F25 for ; Fri, 23 Jul 2021 14:24:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235383AbhGWNoJ (ORCPT ); Fri, 23 Jul 2021 09:44:09 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:56331 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235353AbhGWNnv (ORCPT ); Fri, 23 Jul 2021 09:43:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627050264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jcR4un06wz1FO+JKGHqkKYVpCaQMWUDLuPpEZmySK2A=; b=NhPtjZwVxgAhG/R+pnBL2bsNU9wcStU9rD8nckLJ5+yrddTfct6LbgYm050UI+dwJFVCcI 72R6pBqy3RkmUMkTAzBas2iTiJaW3v3gmkz3FWmxFtk+MGLsT3hMmYzOexfqx21khZfmek oSIBWh3ai/lg4UhVdUKvpkaoTDc2uJQ= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-568-Y574glprOGiadBEMSPlp0Q-1; Fri, 23 Jul 2021 10:24:23 -0400 X-MC-Unique: Y574glprOGiadBEMSPlp0Q-1 Received: by mail-wm1-f71.google.com with SMTP id j11-20020a05600c190bb02902190142995dso1476572wmq.4 for ; Fri, 23 Jul 2021 07:24:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jcR4un06wz1FO+JKGHqkKYVpCaQMWUDLuPpEZmySK2A=; b=I7kJBDejczb2/fhmQig71Gz4iEjE3itq2Kh788Yy7/cx0soZIIoMjUXTT1Ve62FnI/ W7Vnk+dM73lnXGPJkls3+rfZPTW1zPYAyvlNfOYreCaLIHDrQAgfATflSXK3NrwG+yot 9EA9TKaEWucG6+CrBmx71w78vzJ5QfPwZlAts9kg9sPyzb4J5sOQytlr3b4Qqqobisyz kWZwEBKgzI7X9IWK4y4JViERJNAwQwlhUcHAGUIB0oNC0bTRhhSptFFFGYMu0WpUe5w5 CKPC8EFNYaZLR1nfMwusSYsysi7fFtfCAO6K8W05817XcNPwaLwXkXyOEwqk+XpL04/K LlpA== X-Gm-Message-State: AOAM530+dCQ1jat2GhjpsuisrWvwfetuf1P4ynum8DhBlVGcHCjHteLw Zc6K94skIK3JYZcMQvOR1Ojuyt7qt9Ahh9ly1MEQMeUuLJYAsKRJvMHI/jls3q1xXNZqZuxTgkf UPoLwbGolEQb0G1vgZT+Sm9XkKFzv/ruImgqHXK1nxh3oLZei+NvyhyzvhyNW5SEl6jZ+PrtB X-Received: by 2002:a1c:7d96:: with SMTP id y144mr4789336wmc.118.1627050261863; Fri, 23 Jul 2021 07:24:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwvz3cXBDhWNtotDGhDmDd9eDCfseyO3tG0yWRbCF+iirnMJhmxJCkaPwBRNxqGi1vyuvFKw== X-Received: by 2002:a1c:7d96:: with SMTP id y144mr4789300wmc.118.1627050261512; Fri, 23 Jul 2021 07:24:21 -0700 (PDT) Received: from wsfd-netdev76.ntdv.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id p2sm27182180wmg.6.2021.07.23.07.24.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jul 2021 07:24:20 -0700 (PDT) From: Mark Gray To: netdev@vger.kernel.org, dev@openvswitch.org Cc: pshelar@ovn.org, davem@davemloft.net, kuba@kernel.org, Mark Gray Subject: [PATCH net-next 2/3] openvswitch: fix alignment issues Date: Fri, 23 Jul 2021 10:24:13 -0400 Message-Id: <20210723142414.55267-3-mark.d.gray@redhat.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210723142414.55267-1-mark.d.gray@redhat.com> References: <20210723142414.55267-1-mark.d.gray@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Signed-off-by: Mark Gray --- include/uapi/linux/openvswitch.h | 4 ++-- net/openvswitch/actions.c | 6 ++++-- net/openvswitch/datapath.c | 16 ++++++++++------ 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/include/uapi/linux/openvswitch.h b/include/uapi/linux/openvswitch.h index 0e436a3755f1..150bcff49b1c 100644 --- a/include/uapi/linux/openvswitch.h +++ b/include/uapi/linux/openvswitch.h @@ -89,8 +89,8 @@ enum ovs_datapath_attr { OVS_DP_ATTR_USER_FEATURES, /* OVS_DP_F_* */ OVS_DP_ATTR_PAD, OVS_DP_ATTR_MASKS_CACHE_SIZE, - OVS_DP_ATTR_PER_CPU_PIDS, /* Netlink PIDS to receive upcalls in per-cpu - * dispatch mode + OVS_DP_ATTR_PER_CPU_PIDS, /* Netlink PIDS to receive upcalls in + * per-cpu dispatch mode */ __OVS_DP_ATTR_MAX }; diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index f79679746c62..076774034bb9 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c @@ -924,9 +924,11 @@ static int output_userspace(struct datapath *dp, struct sk_buff *skb, break; case OVS_USERSPACE_ATTR_PID: - if (dp->user_features & OVS_DP_F_DISPATCH_UPCALL_PER_CPU) + if (dp->user_features & + OVS_DP_F_DISPATCH_UPCALL_PER_CPU) upcall.portid = - ovs_dp_get_upcall_portid(dp, smp_processor_id()); + ovs_dp_get_upcall_portid(dp, + smp_processor_id()); else upcall.portid = nla_get_u32(a); break; diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index 7a4edafdc685..e6f0ae5618dd 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -244,7 +244,8 @@ void ovs_dp_process_packet(struct sk_buff *skb, struct sw_flow_key *key) upcall.cmd = OVS_PACKET_CMD_MISS; if (dp->user_features & OVS_DP_F_DISPATCH_UPCALL_PER_CPU) - upcall.portid = ovs_dp_get_upcall_portid(dp, smp_processor_id()); + upcall.portid = + ovs_dp_get_upcall_portid(dp, smp_processor_id()); else upcall.portid = ovs_vport_find_upcall_portid(p, skb); @@ -1636,13 +1637,16 @@ u32 ovs_dp_get_upcall_portid(const struct datapath *dp, uint32_t cpu_id) if (dp_nlsk_pids) { if (cpu_id < dp_nlsk_pids->n_pids) { return dp_nlsk_pids->pids[cpu_id]; - } else if (dp_nlsk_pids->n_pids > 0 && cpu_id >= dp_nlsk_pids->n_pids) { - /* If the number of netlink PIDs is mismatched with the number of - * CPUs as seen by the kernel, log this and send the upcall to an - * arbitrary socket (0) in order to not drop packets + } else if (dp_nlsk_pids->n_pids > 0 && + cpu_id >= dp_nlsk_pids->n_pids) { + /* If the number of netlink PIDs is mismatched with + * the number of CPUs as seen by the kernel, log this + * and send the upcall to an arbitrary socket (0) in + * order to not drop packets */ pr_info_ratelimited("cpu_id mismatch with handler threads"); - return dp_nlsk_pids->pids[cpu_id % dp_nlsk_pids->n_pids]; + return dp_nlsk_pids->pids[cpu_id % + dp_nlsk_pids->n_pids]; } else { return 0; } From patchwork Fri Jul 23 14:24:14 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Gray X-Patchwork-Id: 12396167 X-Patchwork-Delegate: kuba@kernel.org 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=-20.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, 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 8C2E7C4320E for ; Fri, 23 Jul 2021 14:24:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6114260F44 for ; Fri, 23 Jul 2021 14:24:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235406AbhGWNoL (ORCPT ); Fri, 23 Jul 2021 09:44:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:26317 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235360AbhGWNnw (ORCPT ); Fri, 23 Jul 2021 09:43:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1627050265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ms3j5GjcBhU2kzOEyerWT/jDkz2YpaxMmXa1WE0AxlE=; b=JmApfvepjGtP6H4GRjLR5KRJwbwoWHBQ/vG7ZT2Jnth0qYXH7TnwLIWB1nNR5VAna0ywnc 9S8RgbPU7PSvCkZBYwnJABbctJll9X2e+ke8WZO3BADDuddQGin045JX6jXYFMd0/ih0Ow FbB81zs/+59XxbpBdZytY/NaposLNs0= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-561-EeuIDFOmMDSsTNQ8pqSPLQ-1; Fri, 23 Jul 2021 10:24:24 -0400 X-MC-Unique: EeuIDFOmMDSsTNQ8pqSPLQ-1 Received: by mail-wm1-f70.google.com with SMTP id q188-20020a1ca7c50000b0290241f054d92aso144416wme.5 for ; Fri, 23 Jul 2021 07:24:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ms3j5GjcBhU2kzOEyerWT/jDkz2YpaxMmXa1WE0AxlE=; b=XkB5XGkxHQbSnjubcUpeLpGgfMQvisl39QSlhkJMuBvKW8jY5dHF+4Vm7osPm52WDS TWSwhh3d1Q/wFp6hW1Jia6YWPA2QLSyzGIQjTB5SO4G2f1UsiYlxHOd7lGjjKfvsw7Nc t2ul+3qAu3Hi86psQN2wI26gkUiW3bYcBA1BJHrQZ8cYaZKbsizUHauXWrDJYKXFRrRg qfVPUJ9LQeF12A8pWc6vY476l+jVV7O8Goe9ST5ApNN+SHWttIbYkaMPmN6TxbqsbLMe L2NXbX9SQVTBxDa7I9mYzkQXs3COYM12AJEu0igr5cK8ox/VS7Vr0OssZXMIEvVrb/HL lQeQ== X-Gm-Message-State: AOAM530DovZ75AhMgupGt9JaheznNzriTaO/tss4FBHz3RO0ZR0EvpoU 02vFcO4kvESaOE2bjNWq4ZcH8nCnpB6xbSN/DAa+iTfW39xUkYyw4oeOS1N+Fom84e/nv1yujUy p3tQr+Li4j6VBjvU5Ho6mQjLoAugVsVW1rI5SYXPSmIpit0hgy8y+ARRO7X2/RLuUejiLXCik X-Received: by 2002:a5d:4748:: with SMTP id o8mr5574711wrs.202.1627050263268; Fri, 23 Jul 2021 07:24:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxQYL1EwUw2+n2YspnNZJtv0xA5geEcgc8zV6Pp/liXGLyPRoKoYuVWVc0wo1y1zWxulURbRQ== X-Received: by 2002:a5d:4748:: with SMTP id o8mr5574688wrs.202.1627050263042; Fri, 23 Jul 2021 07:24:23 -0700 (PDT) Received: from wsfd-netdev76.ntdv.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id p2sm27182180wmg.6.2021.07.23.07.24.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Jul 2021 07:24:22 -0700 (PDT) From: Mark Gray To: netdev@vger.kernel.org, dev@openvswitch.org Cc: pshelar@ovn.org, davem@davemloft.net, kuba@kernel.org, Mark Gray Subject: [PATCH net-next 3/3] openvswitch: fix sparse warning incorrect type Date: Fri, 23 Jul 2021 10:24:14 -0400 Message-Id: <20210723142414.55267-4-mark.d.gray@redhat.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210723142414.55267-1-mark.d.gray@redhat.com> References: <20210723142414.55267-1-mark.d.gray@redhat.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org fix incorrect type in argument 1 (different address spaces) ../net/openvswitch/datapath.c:169:17: warning: incorrect type in argument 1 (different address spaces) ../net/openvswitch/datapath.c:169:17: expected void const * ../net/openvswitch/datapath.c:169:17: got struct dp_nlsk_pids [noderef] __rcu *upcall_portids Found at: https://patchwork.kernel.org/project/netdevbpf/patch/20210630095350.817785-1-mark.d.gray@redhat.com/#24285159 Signed-off-by: Mark Gray --- net/openvswitch/datapath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c index e6f0ae5618dd..67ad08320886 100644 --- a/net/openvswitch/datapath.c +++ b/net/openvswitch/datapath.c @@ -168,7 +168,7 @@ static void destroy_dp_rcu(struct rcu_head *rcu) free_percpu(dp->stats_percpu); kfree(dp->ports); ovs_meters_exit(dp); - kfree(dp->upcall_portids); + kfree(rcu_dereference_raw(dp->upcall_portids)); kfree(dp); }