From patchwork Wed Oct 23 21:12:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Ovsiannikov X-Patchwork-Id: 2001305 X-Patchwork-Delegate: aconole@redhat.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nutanix.com header.i=@nutanix.com header.a=rsa-sha256 header.s=proofpoint20171006 header.b=HBIHC3XE; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=nutanix.com header.i=@nutanix.com header.a=rsa-sha256 header.s=selector1 header.b=hiZq+M0N; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XYhbK5Tt3z1xwy for ; Thu, 24 Oct 2024 08:13:01 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id E529F80B22; Wed, 23 Oct 2024 21:12:59 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id cRIAYoPUMsnq; Wed, 23 Oct 2024 21:12:58 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.9.56; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org A7F6680A48 Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=nutanix.com header.i=@nutanix.com header.a=rsa-sha256 header.s=proofpoint20171006 header.b=HBIHC3XE; dkim=fail reason="signature verification failed" (2048-bit key, unprotected) header.d=nutanix.com header.i=@nutanix.com header.a=rsa-sha256 header.s=selector1 header.b=hiZq+M0N Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp1.osuosl.org (Postfix) with ESMTPS id A7F6680A48; Wed, 23 Oct 2024 21:12:58 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 567D7C08A6; Wed, 23 Oct 2024 21:12:58 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id 25D08C08A3 for ; Wed, 23 Oct 2024 21:12:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 220F380A48 for ; Wed, 23 Oct 2024 21:12:57 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id xQy8zVtS0rrW for ; Wed, 23 Oct 2024 21:12:56 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=148.163.155.12; helo=mx0b-002c1b01.pphosted.com; envelope-from=mike.ovsiannikov@nutanix.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp1.osuosl.org 1A78580530 Authentication-Results: smtp1.osuosl.org; dmarc=pass (p=none dis=none) header.from=nutanix.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 1A78580530 Received: from mx0b-002c1b01.pphosted.com (mx0b-002c1b01.pphosted.com [148.163.155.12]) by smtp1.osuosl.org (Postfix) with ESMTPS id 1A78580530 for ; Wed, 23 Oct 2024 21:12:55 +0000 (UTC) Received: from pps.filterd (m0127841.ppops.net [127.0.0.1]) by mx0b-002c1b01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49NI5Wsp028039 for ; Wed, 23 Oct 2024 14:12:54 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; h= cc:content-type:date:from:message-id:mime-version:subject:to; s= proofpoint20171006; bh=JFDgEir/f8Op+DwGj1qAZaIltbRfBp4vQ2aWHy/4I GU=; b=HBIHC3XEk4ELn0GdAVm8pGEK6Wjsaexsy+LlU7pRredTO2UR7neFG/nU0 4wANdzBOI0jbdxEbsqypUaekCPiHCI66+on4gOw9QbXGJs1JL8Ih9izbhnQvIHte 6Te7jQLulcD8qY7iZyS3XQIDfj7IKbW6Q2eJJEKSb4G+Bf92YTsopla9pVoHMQ66 b935zVfN21dVkwvYYVMUbwsvTxRBybFXn7k4diIrFuYxfSucqbIDSjPYt1JS+O8w 0Oakn+siMxbUki/ryxYxMS4RDmHg0uTPWEQrtOAQjDYc0NTCUSbDhMhM6XpI8CM2 yOPdre/7YK1PH4Wirszldcu/PlMZg== Received: from cy4pr05cu001.outbound.protection.outlook.com (mail-westcentralusazlp17010004.outbound.protection.outlook.com [40.93.6.4]) by mx0b-002c1b01.pphosted.com (PPS) with ESMTPS id 42dpcdfcg4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 23 Oct 2024 14:12:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YcOpxR2lGRL2urGf4XTPNUXBMupJublBliP/6e15GIviijYLPfqrEz0vxb4qKfOZEnkfjo/wJwmp9XZa9+gf14WJJOGuBcMt8cMVqroFf4MYuaHsayBe+59+USBCKiWu3r2ZOEUSHZf773uAj4vQH+5yDdhcsblj1V7O2l/O//7vYHr6ODj4Tq/pmJ69x7L/HhFHdQxgmCt7LOqOFR1nG2e1n2VWNjqt+1afJfqao1cX9RNvZjkR+abNgP1v26cIKHvaEb/kT7zxmKLLJXfrOPfh6I2h5mU9J0pyN8mz43g6eJ9KM6JjsVYSDvIYJ3oqKeSfwK4JHWiKc/zfvg+Ikw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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; bh=JFDgEir/f8Op+DwGj1qAZaIltbRfBp4vQ2aWHy/4IGU=; b=CtvyfAQtkYnR/xMkh9MDH1j/NU1fjEebB4HvpNyNWtHsHYCAcgmRLM1l5PZ4uxPy8WbkTuHxFqwHSsECywDTiLnVckyTwowbyYx3578pn2GE/6YrwwdHBg4B9G9Jd6Fjp+1TqgFMNSlqE/UPe7GDey0p169Hxb/TTkbqC8uZemu6dXDc/8t6GNugEIPqw/xHV7arhV1LMy7/g8WWRLfpRWHFRm2qjlCir6iJexncEuDdJV1b8J/Kj1eCnUIX8Ws/JoGUCPflYvqZChah9LEN6144zYsnZoueyDvP68KtJK58IzO3sLbe4n13x1ydnuBNKrBLM2HGNzKvE8vv+V0c0w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nutanix.com; dmarc=pass action=none header.from=nutanix.com; dkim=pass header.d=nutanix.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nutanix.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JFDgEir/f8Op+DwGj1qAZaIltbRfBp4vQ2aWHy/4IGU=; b=hiZq+M0NTzy4PNSu1i/NKBGAV+/aY6bKopIe4DlW0L4PCxuGRWkoBrkfpPKA46E8DSw+L0v8/1CcxyGVCTdosNEuw05Nv3JHWfZ/beeI8sLb4UQwS8mQI/K3TqrWlAEzfNoKERrLDZGh3AxKCmmVNCrNrX9pcsaXH8g10RlgbvbejiZTZvDHfPyCtjLKByX3Y8sESNgS9fOamzI+OsFL+kc/c5QTjlkStUX7Y3G6v16gt0QoZlE1Zy5MIJ28AQOFfdDQTwR1a9V0wihB7U6UtHv0nUgqLuKTZMR+ViWTtADLBITI9VCUa+DrueM+3x+DjueS53cerBb2S/PJf7emLQ== Received: from SA3PR02MB10114.namprd02.prod.outlook.com (2603:10b6:806:39f::9) by BL3PR02MB7876.namprd02.prod.outlook.com (2603:10b6:208:33f::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8093.17; Wed, 23 Oct 2024 21:12:51 +0000 Received: from SA3PR02MB10114.namprd02.prod.outlook.com ([fe80::f240:4738:442d:d2ba]) by SA3PR02MB10114.namprd02.prod.outlook.com ([fe80::f240:4738:442d:d2ba%6]) with mapi id 15.20.8048.017; Wed, 23 Oct 2024 21:12:51 +0000 From: Mike Ovsiannikov To: dev@openvswitch.org Date: Wed, 23 Oct 2024 21:12:44 +0000 Message-Id: <1729717964-129926-1-git-send-email-mike.ovsiannikov@nutanix.com> X-Mailer: git-send-email 1.8.3.1 X-ClientProxiedBy: BY5PR13CA0019.namprd13.prod.outlook.com (2603:10b6:a03:180::32) To SA3PR02MB10114.namprd02.prod.outlook.com (2603:10b6:806:39f::9) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA3PR02MB10114:EE_|BL3PR02MB7876:EE_ X-MS-Office365-Filtering-Correlation-Id: e3d60805-8c76-4f43-7c6f-08dcf3a773e2 x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|366016|376014|52116014|1800799024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tQ4+opuqU6REEO6Sle0WM/UTMw13XCuuMflyVDdzvyA09Tmd/D3E9c5qpx30nwYuEzUMA1xQV7n7aRJ8m5nG1SW/lAUDIfCvhfZ2F8iSnR6TnbcIUZzFN5gnIocFMiH7GSJwo4g+SKQQoPzgKbUHeRACdIrPdXYRq2G0bfgrjSGGm8diPUKLZdalu7V+bNYEA6BNgqZq454/ZpgYT/FB+4+pSbQasP0DlGAZqVKFYzPyC3mptgtbJ+FvckojXCejM5N4D4ng28EOuCEy/TYEvUxcLfIzTqQ8kDCI+BjSFwyOxKTWSP+uVhfWVcq82OMWFAOO577md48yF1A= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA3PR02MB10114.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(376014)(52116014)(1800799024)(38350700014); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: jl1IRETVegL7qbfticUGHUzoQssuf5YAHi9W2vajvwJJ3ewuOc5g76ZuqpZMspMKOQzbXqbfmzOFzXdBg0eQVLmwh0u6N+bU1qZhnWLVR7cuX5JVVd8Qn9UY0zsRK69AbfJKVCgiRXmIgWO7FUHeIqTlou0EWdSdPO8ukK/mzUVaBwc7WzKVd66ZJFoxF6Shmky7obLqu3V9dbar3Wr0KAYJJTfFWz0jZ2fwzxBqCDlJR9O95rF6T+qpLACJrwwxmRVZ+w2OESG4zN5ogGig/m0BFHkgiONlGyDwZFArDwF+Pv+pSrD6Xlgw5pjuJY9vnsq+fFvrBwPX1G6MXxzJuCBYuT/Tdz+Eix9HldLclLqHwNLJYtvkciM/kX0MzwzzZsMk/6uxtrVRcS6+X02YwHulTRvO9JmyJx9BbokcJkWPkaLWFwRFZiYBqveexwI/r15QhgMwClQlrWccTRrMaUTDCwDlKtgu3hCzzWKW2RY5/5sgWJJ30xtSaiBc3Dpnr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BTHP/UbAQ0GAsgbzGG3XulyE0MOG0rPwB5Q== X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: e3d60805-8c76-4f43-7c6f-08dcf3a773e2 X-MS-Exchange-CrossTenant-AuthSource: SA3PR02MB10114.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2024 21:12:51.0819 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: M6HW+diWUrxCG8/DkF0/ukrzbtrqDVSM+psBBoFn8T47B6afDHCDyfvs3a8BrL/Aogch3nsXGce3OqdwYEaix3wKUMM/e0hAHR/CNclErq8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR02MB7876 X-Proofpoint-GUID: nc6DASi2doWkbjbthCgXpX_IVhCFRfFt X-Authority-Analysis: v=2.4 cv=O8Rrvw9W c=1 sm=1 tr=0 ts=671966d6 cx=c_pps a=YCJezUkNvC3bKg1Ra8oh3A==:117 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=xqWC_Br6kY4A:10 a=DAUX931o1VcA:10 a=0034W8JfsZAA:10 a=0kUYKlekyDsA:10 a=64Cc0HZtAAAA:8 a=4q94-WZBFsjphqMi1JcA:9 a=14NRyaPF5x3gF6G45PvQ:22 X-Proofpoint-ORIG-GUID: nc6DASi2doWkbjbthCgXpX_IVhCFRfFt X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-23_17,2024-10-23_01,2024-09-30_01 X-Proofpoint-Spam-Reason: safe Subject: [ovs-dev] [PATCH] ofproto/ofproto: Initialize learn add rule flag. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Initialize learn_adds_rule in order to prevent crash in ofproto_flow_mod_learn_finish() due to being invoked with uninitialized rules collections. Signed-off-by: Mike Ovsiannikov Signed-off-by: Mike Ovsiannikov Signed-off-by: Mike Ovsiannikov --- ofproto/ofproto.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 122a06f30..9ba93e380 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -8204,6 +8204,9 @@ ofproto_flow_mod_init(struct ofproto *ofproto, struct ofproto_flow_mod *ofm, ofm->n_conjs = 0; ofm->table_id = fm->table_id; + /* Initialize flag used by ofproto_dpif_xcache_execute(). */ + ofm->learn_adds_rule = false; + bool check_buffer_id = false; switch (ofm->command) {