From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AA6C0315D43 for ; Thu, 7 May 2026 11:03:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778151832; cv=none; b=JdgfqnxFuzffF5kHqry9JJcNxAdS4k8SDT+f+BReQoPxsFdZ/7LMElOWmoL9eloQ6kVkszBAc5IRfYts2N2XGiwnZ3NDYgTlvp0NNqnpAOcZTZ7xelhV//lKQUmJIUKNJgBYu4vgYBBBY9JudK3/FS59j6HSQbKrJUhpx56gO6A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778151832; c=relaxed/simple; bh=AW5KTQD6JJ+koVuSUIfKl7xusqNrOpHZz58nkZ4KQn4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=A1GutFRJpst8T4Jy3ZShqh9OuqaCSVUi2SDaw9LawyJJSDhKSb+L5tRxJ7Hy2lZuj9vR/F3cmTFuY+/yvKZBTx4mKzY1fJ70WVv/w39INOufyem/d+jx5zsRFoxvz12XSP40xJJ38rN+Vt1KsLic2mUfXrVjjqNr3uFvhHj92AI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=HzbOeQzK; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=TayXTeFr; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HzbOeQzK"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="TayXTeFr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778151830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wUniSdMsdiQoFHzn4uWTGYzknL+ZqOJGdHgYphdXY2I=; b=HzbOeQzKl0+FRGd9WugBzDZBIXAkKtOR8pCHR5vdVDmMalXbthBFpz86gu1pwr7QmbXC+I hWjPiLzV0h9Ww/OdTXwDR6DthNLZ7tMn7ZeMeUfDlqE2citpzeR3kG3Hq8/b2ygg8xutqb HLrzYSHbGTJsYEGeX/D3Pu+Hy25NYt0= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-665-oDqtVn9dPSuEciYZr228yg-1; Thu, 07 May 2026 07:03:49 -0400 X-MC-Unique: oDqtVn9dPSuEciYZr228yg-1 X-Mimecast-MFC-AGG-ID: oDqtVn9dPSuEciYZr228yg_1778151828 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-449dcfe8005so608461f8f.3 for ; Thu, 07 May 2026 04:03:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1778151828; x=1778756628; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=wUniSdMsdiQoFHzn4uWTGYzknL+ZqOJGdHgYphdXY2I=; b=TayXTeFrPRB5IuxANDTXGu8EqZG7eK8Zz9s8hSJ0z3JEbNHUEfnZ5g9Y0AJ/zavMb/ 5XWLWgNL0keT2lEVg2TWDuiA6B1JlddYfauFzvfrwyc/isG+ZOxaAA1Ga/wzk1crqChy IImqU1ukowBB2O6wO7hgF9bG/IhpZRg/+ji/RUEqVIrLotE5ERbBRsUo764yIyyePzGp gF8/i2sf7fLsdC1iQNZ9Pfmo2gAcC+mGHZzy02amxOk1aa5XrboPOonkht1vQgqpC9bO fhFM8TZBBH10U395cuAVvBP2fHq1F+Yc5M59mxlz/RqpRa8N4xY545eizKNdZeLTP868 Zp1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778151828; x=1778756628; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=wUniSdMsdiQoFHzn4uWTGYzknL+ZqOJGdHgYphdXY2I=; b=M5vK2kw36dk14my3ZSB0u7INUd3n9Ge4IIIuD7PxgBDwn3rkzEGfaJNxiFaieYmGvZ JMj/PIfNV2aROLDbMjFyJqZtRB5OG8lEWiU/pl2eeZTzb0iovL+J6AphCB1Bej7EHa3v rW5Z5nC7JBaEtrsGTjulsyL4Z1AEJBwgIzGNDorx1SEn9GB1vgcidJs66HX1wbtMDH/T PBne7asaVsgMK/aRARXiVcPB60h3y8jlbQphRDM4ddgdH6EbRXHxhqCsgATRnhnQ9afq URPzw3YSgvYDX0NHX+/VQ9k92pTkq8OYfQebbs09Uib2e5OBmI/J5mBU6mizEBawSJHw yS7g== X-Forwarded-Encrypted: i=1; AFNElJ9TkYOcRru/keeGjrKGmhO4BGhtP9tryURMi8iFV2s9sMePR/LVpyrEyWmP5AlSowOSpLWy2WOkZL7Ge84=@vger.kernel.org X-Gm-Message-State: AOJu0YxxRht6Vyhaf/rMn1rASl76YrmL/VxyyaznFHWqcb2vjQZWRf9G M+mnqRwSmbezL9np//lwz5DQwrE2Y/oiEwa3a935v8SfxVUYRe9+Q3AloZNuJNW5yDSiyCn46y7 cTPQ6I0qpjXTF23yIhc/KH/y3iX/5/PBPxMK8cyJaZwkgOXzG7JOKbfYc2+wc9b4N8A== X-Gm-Gg: AeBDiet5X2nvpl+0IVSMaJW95FF2MooKddNJNRAfkrSGpJWWHfykCmYwVSmB4DWWFEx voUmqysABxVhvqlSB4DnmOPzVpNE4OEwhCd1vzXt6mQR5qwsENM+WqLon9M+QdPwYL7KMT9TzPC XhW7FxYMfm0LPmodUDbwX48ux6tGLJ7NIF9bVwpiHkqhunOf+NmyFWMlvp+20l0PZhqTO2Q8990 G/RPsFjpiK/nGVms8OSRZaA9pRa0mkjz7/cRQj/AfyBefvejU0i/j5vmG+tMXAEryFJzk8NPpOK RsMLBHiR8P7zt7t5B+TQ5eg7Qyy/iTSpDcfACQ1vnaQw5p7RDTRmu84hxDTNZB7FZpOxloCMQyZ 5LRuEU8zocN+ZrJbekfYWr15yK6qedxqFgdlCH2LXFkuyR3IWlWC/jf3PcVqJiGN06w== X-Received: by 2002:a5d:64e7:0:b0:44a:9b52:8891 with SMTP id ffacd0b85a97d-4515b42fbc4mr11792562f8f.11.1778151828194; Thu, 07 May 2026 04:03:48 -0700 (PDT) X-Received: by 2002:a5d:64e7:0:b0:44a:9b52:8891 with SMTP id ffacd0b85a97d-4515b42fbc4mr11792474f8f.11.1778151827500; Thu, 07 May 2026 04:03:47 -0700 (PDT) Received: from [192.168.88.32] ([150.228.93.82]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-45055d381c8sm18376896f8f.33.2026.05.07.04.03.46 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 May 2026 04:03:47 -0700 (PDT) Message-ID: <1cc38ea2-74ac-49f5-97b1-b9404726bdbc@redhat.com> Date: Thu, 7 May 2026 13:03:45 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v3 1/2] net: openvswitch: make flow_table an rcu pointer To: Adrian Moreno , netdev@vger.kernel.org Cc: aconole@redhat.com, Eelco Chaudron , Ilya Maximets , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Simon Horman , "open list:OPENVSWITCH" , open list References: <20260505084253.998548-1-amorenoz@redhat.com> <20260505084253.998548-2-amorenoz@redhat.com> Content-Language: en-US From: Paolo Abeni In-Reply-To: <20260505084253.998548-2-amorenoz@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 5/5/26 10:42 AM, Adrian Moreno wrote: > @@ -752,12 +759,16 @@ static struct genl_family dp_packet_genl_family __ro_after_init = { > static void get_dp_stats(const struct datapath *dp, struct ovs_dp_stats *stats, > struct ovs_dp_megaflow_stats *mega_stats) > { > + struct flow_table *table = ovsl_dereference(dp->table); > int i; > > memset(mega_stats, 0, sizeof(*mega_stats)); > + memset(stats, 0, sizeof(*stats)); Is this an unrelated bugfix, preventing random values from stack clobbering the stats? Should it land to a separate fix for net? > @@ -1501,8 +1537,13 @@ static int ovs_flow_cmd_dump(struct sk_buff *skb, struct netlink_callback *cb) > rcu_read_unlock(); > return -ENODEV; > } > + table = rcu_dereference_ovsl(dp->table); Possibly: table = rcu_dereference(dp->table); would be more accurate > @@ -518,6 +524,7 @@ void ovs_flow_tbl_destroy(struct flow_table *table) > call_rcu(&mc->rcu, mask_cache_rcu_cb); > call_rcu(&ma->rcu, mask_array_rcu_cb); This is always invoked after a rcu grace period, it would be probably nice to follow-up, not necessarly in this series, moving the above call_rcu together with the call_rcu(table). Such statements could be bundled in a new helper. /P