Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp1997282lqa; Tue, 30 Apr 2024 05:52:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUi/mdUEsoHd2JiiSclpwthnmzjFNG+6ul+iMhfT6fNHTtUbgB83tFLfvuhlXXT2EmbOUN6fi96/iOLWyYP65l3Rq1SZRm+HxmmFSMhOQ== X-Google-Smtp-Source: AGHT+IElIbK7Op15abNDnimmXMYu5CgjFBhqIg1/VU3krp9TfH5VBq/lMHps8XUSp9qkrU7Z8PO4 X-Received: by 2002:a05:6870:47a1:b0:238:b140:1ab with SMTP id c33-20020a05687047a100b00238b14001abmr15243838oaq.48.1714481569438; Tue, 30 Apr 2024 05:52:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714481569; cv=pass; d=google.com; s=arc-20160816; b=qurDVHY8djg1DFYJuP9X2FRWBoaF+hiZgn4V1A+EhS+uOke9f/HA8lfybUfuvxV+GY V4SR3ag6CIKkh38UkUFDeJB4K1OOE9CFFDEMVupuS7KJQ7SJCovrykgFwK03H1p89F2a 7KG7u7XaOJC7WSFo8GMR556G18tWkEJEUZR/vZeJMZxtIgtqLUpLvKCra19n17A3S7yW JG5lwwne2N+UXJNf4Redj7qoh1ZSH99kiJyDYmil9xPbI1hYwddqJubZRycDjefy1iQx SsArj8wtk9/06FMrHQWDKOlhYlGji0OUN7/WO/XFXrIi5BIETbQgn3EWhYFg4b00xR7t Cimw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=goOxevFjxH4VpzEj6RKt3Supv373/CAuCxQRX8Wcj/U=; fh=46kcixnVD305Ku5cevX/wAWhc1ikVYfJu81RLIqy7W4=; b=nUaL+4aAp/tAsgcr4kUKRkScUq/vgPD91IxUDiD8h9yan5lvTUAwbigyOkRFbAkBF9 WiGOQxo4/UosubvPFqCwYjOYPXay1Oz26D0u1J1tdJdcYgkXDP+uPQ2ExXLDEdbxRTDK dcidCX4fKWkxa3yb3S2rnZX6RUIfcuaX4UJpU6SG7h+3ZK+mdw/lqck58OE6nYbjVxcD gqBHzhCjgNdqK14VxO/l2dvTlkHS542Tu8mxuA9edBX+G3aqW5BAtmiTBWuXYSySRz80 ICRXuAkhXNAj2J1beZflU8vJq+2ue5aVBgcsy1WkBiPA7ej5f+hnBOP9PLY6pG9yMETW GN3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bE7Uv54C; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-163933-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163933-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id i20-20020a63e914000000b005dc788f3767si22212241pgh.620.2024.04.30.05.52.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 05:52:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-163933-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=bE7Uv54C; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-163933-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-163933-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 70C91B21195 for ; Tue, 30 Apr 2024 12:51:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A9837171E48; Tue, 30 Apr 2024 12:50:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bE7Uv54C" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 C994F17166A; Tue, 30 Apr 2024 12:50:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714481453; cv=none; b=knNZHtIyDpzPXmimLD/7jAwT2LAXRAXLkrRimSEryF2V2/76VF5RgXy337gYEpf7hAZkU42IfsJSBiv0rLNOdbEMtOMQvF64vRrROT8wA9H71B20j3Tk/NPftDW7g0TSXYESoUw5OcCQ4NA8RolJKA3FaXUV3bE7Ze2y3/OX7ds= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714481453; c=relaxed/simple; bh=Gt9uzlCU6Bhi4Wo521ImdXL9omLXvut7bGKwKJCAJXU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qe9GRInBIHi0ZWIlPq3r8NPs/xtTjV4XUcuo7xzweklFsCEfCzInT+BKZywTm43riA0pEYLuWurBVe01mBmoYTj+l4hsFU0QHbdBPdFTi3ge8fSwAOdlqeGXSi+2uieI61jN0N24IaukaJE8N/sb67rqepk8SwjQi6wU0Tfln1I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bE7Uv54C; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 547CDC4AF1A; Tue, 30 Apr 2024 12:50:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714481453; bh=Gt9uzlCU6Bhi4Wo521ImdXL9omLXvut7bGKwKJCAJXU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=bE7Uv54CxnO5vUHcy5cGiflE6UIDmqH/58vkBioHHnNkPZknthr4CJG6ZCsUSmy7z Ja+JdC3Mde+ZxNCxsEoDd9ZgEQDxlwjsqBrDTtQaC4WtEBVplE9sRTZI2hf1tUCtem xVkkHSGeGfyBlUdpeHQs7YiRs/qzA2hnqGwpTpnpMwEUmj5fh4q07NU9SSLB5RZ9pH gFyKVauphjT9ysqG7KfV7U1tqb3Ayj9Tef9T9zy7mwrLImagyyP/+c+kCAj/EpxmeZ AulEleTnNow1MKJ1GQxXln7LGGaWOa+iXVsUoQ98qVBr2+zXasIFJlAjiNOT+wwlR4 u3Q5YBI6/iYvA== Date: Tue, 30 Apr 2024 15:50:47 +0300 From: Leon Romanovsky To: Dennis Dalessandro , Breno Leitao , kuba@kernel.org Cc: Jason Gunthorpe , "open list:HFI1 DRIVER" , open list , linux-netdev Subject: Re: [PATCH net-next] IB/hfi1: allocate dummy net_device dynamically Message-ID: <20240430125047.GE100414@unreal> References: <20240426085606.1801741-1-leitao@debian.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240426085606.1801741-1-leitao@debian.org> On Fri, Apr 26, 2024 at 01:56:05AM -0700, Breno Leitao wrote: > Embedding net_device into structures prohibits the usage of flexible > arrays in the net_device structure. For more details, see the discussion > at [1]. > > Un-embed the net_device from struct hfi1_netdev_rx by converting it > into a pointer. Then use the leverage alloc_netdev() to allocate the > net_device object at hfi1_alloc_rx(). > > [1] https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ > > Acked-by: Dennis Dalessandro > Signed-off-by: Breno Leitao > --- > Changelog > > v5: > * Basically replaced the old alloc_netdev() by the new helper > alloc_netdev_dummy(). > v4: > * Fix the changelog format > v3: > * Re-worded the comment, by removing the first paragraph. > v2: > * Free struct hfi1_netdev_rx allocation if alloc_netdev() fails > * Pass zero as the private size for alloc_netdev(). > * Remove wrong reference for iwl in the comments > --- > > drivers/infiniband/hw/hfi1/netdev.h | 2 +- > drivers/infiniband/hw/hfi1/netdev_rx.c | 9 +++++++-- > 2 files changed, 8 insertions(+), 3 deletions(-) Dennis, Do you plan to send anything to rdma-next which can potentially create conflicts with netdev in this cycle? If not, it will be safe to apply this patch directly to net-next. Thanks