From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: passt.top; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=fWik4Fhl; dkim-atps=neutral Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by passt.top (Postfix) with ESMTPS id F28F45A0627 for ; Tue, 18 Feb 2025 16:30:52 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739892651; 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=LbGvdKaAYlkFFh5csgz3qo+WPxe+mYbK2RSrYfUjm4Y=; b=fWik4FhlhLd9ASpljKTrcHg27tER1vPDtyDCF9eFJ3y8+SG+J7gLa//gY1eOWfMmX6/qz+ 9NNF0o3oN7JgqGdAaIkyQ5thznYi701C3l4GudjmJg0xU8OkcwjloyAyJa625ucjNpyBT7 dEw3Writ8pY8lagBLi+EiYyI+dnohOI= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-679-Ag2809QhO4yfLQWfnS9Q9w-1; Tue, 18 Feb 2025 10:30:47 -0500 X-MC-Unique: Ag2809QhO4yfLQWfnS9Q9w-1 X-Mimecast-MFC-AGG-ID: Ag2809QhO4yfLQWfnS9Q9w_1739892646 Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-38f32ac838cso2872494f8f.2 for ; Tue, 18 Feb 2025 07:30:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739892646; x=1740497446; h=content-transfer-encoding:mime-version:organization:references :in-reply-to:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=LbGvdKaAYlkFFh5csgz3qo+WPxe+mYbK2RSrYfUjm4Y=; b=QDjW16ww8rjElMDKH7i0EKomb53IHk2Fogy3rpGUvFdNYPwnOKLfAi6uuIvtQKOsdQ 17nwaBhSXCbxUtnhg1JWR8P3JrlqJ32YwqvZuirWGp2ogdSqfgEX6GwSgBXlV8pyqAek Lu7NByjHiiXKfIpPjsougCluh8+P6nJrBN5AJ+/r89uTpnbGIgBgGXLJdRwF8CmGwN8o pCikMI6/mN/naK1fCmzmqrdHazHjl3I6v1OJF4FIkAcMsj2moKy+DWsQZSc//5f4O57M 1O+KSESd4SC42PKtjZxFP4zJv32XA7WitNJ7XliKuLpBb6fuZ74e0pETCeZEZChtMgJL TlfQ== X-Gm-Message-State: AOJu0YyeVvXCV+cMw3HG+TmNc/vu78Emtco5WVy6tfJRbe9Xda4uSn8T TD7oK+80ThqTcNj4uxS2GTRs//tenGt1N3Id226g7vt7V2q0oeq92eADcjXrzxXB2a+sox9TcDi TdrjgJMrwacogUWVjnxkit+35giHJkPh0gEMaeLKCpwSiUAyzRg== X-Gm-Gg: ASbGncsTtfamzyrizz9lHMfeFTCzuWwXkk0FBrLqEj8cAYckpiVwFgLNcy+PfAfc809 WDYcjeWUORZLAxjsfqVFmZaMNa6REJ5FsheLCmHF3DdUZC6/eZq00UNCJBsQlCZ3jQ8yE1nxgM6 WV83lJYByhCyVcKmKkDb4wtvhIFQOAf6GOE0ouZ2xaV80REwpi+RmfaejPZig41iriyDRnGXmAk mMlsZ/7yNfTzya/IkLV51+WTzHYKDgYrPK1UDI7F6Dr09zXAscR8kg+BATU1L99FcAmhoa9NVi+ VftmiCYZAzENtMiJ X-Received: by 2002:a5d:584d:0:b0:38f:2a5e:ec5 with SMTP id ffacd0b85a97d-38f33f2f341mr10134025f8f.24.1739892646138; Tue, 18 Feb 2025 07:30:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IF7kHN2II4hdw1bBwQ+0F5drwtF2gc/1q+kGeR/GSkw5xkuzpOXyrOdEe3FvYappB6iv1mDMQ== X-Received: by 2002:a5d:584d:0:b0:38f:2a5e:ec5 with SMTP id ffacd0b85a97d-38f33f2f341mr10133978f8f.24.1739892645720; Tue, 18 Feb 2025 07:30:45 -0800 (PST) Received: from maya.myfinge.rs (ifcgrfdd.trafficplex.cloud. [2a10:fc81:a806:d6a9::1]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38f259f7df2sm15304258f8f.84.2025.02.18.07.30.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Feb 2025 07:30:45 -0800 (PST) Date: Tue, 18 Feb 2025 16:30:42 +0100 From: Stefano Brivio To: David Gibson Subject: Re: [PATCH] tcp_vu: head_cnt need not be global Message-ID: <20250218163042.205ff4b8@elisabeth> In-Reply-To: <20250218025013.1035148-1-david@gibson.dropbear.id.au> References: <20250218025013.1035148-1-david@gibson.dropbear.id.au> Organization: Red Hat X-Mailer: Claws Mail 4.2.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 7vud1x_Uy4-YBLK_jCzkOLMOXIATiFr1GtSpqByTAdU_1739892646 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-ID-Hash: ED53ZWGEJ4NTN3BLISJJVXZHLWK6U5PJ X-Message-ID-Hash: ED53ZWGEJ4NTN3BLISJJVXZHLWK6U5PJ X-MailFrom: sbrivio@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, Laurent Vivier X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue, 18 Feb 2025 13:50:13 +1100 David Gibson wrote: > head_cnt is a global variable which tracks how many entries in head[] are > currently used. The fact that it's global obscures the fact that the > lifetime over which it has a meaningful value is quite short: a single > call to of tcp_vu_data_from_sock(). > > Make it a local to tcp_vu_data_from_sock() to make that lifetime clearer. > We keep the head[] array global for now - although technically it has the > same valid lifetime - because it's large enough we might not want to put > it on the stack. > > Cc: Laurent Vivier > > Signed-off-by: David Gibson Applied. -- Stefano