Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp363296lql; Mon, 11 Mar 2024 05:17:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXfxclDusw4E+udK1c4xBqfgsipwYlgJpI9EL5zLvHpoBkcOyQ3+6Lac9zFY+UGJair4BKP3bp50jUYbzBJUgH0t6LQHaSd8yd6c7yr9A== X-Google-Smtp-Source: AGHT+IE72rCuW9JbyV0hmqyj9GaCnlNiSoSnATIu6FDJJXj+arkZR5VVs4kebHMwFvf45/MoFmvi X-Received: by 2002:a17:906:3407:b0:a3d:9ed3:dd1f with SMTP id c7-20020a170906340700b00a3d9ed3dd1fmr3348940ejb.18.1710159451107; Mon, 11 Mar 2024 05:17:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710159451; cv=pass; d=google.com; s=arc-20160816; b=J8h1tWtQ7rx+9MW2hDjGetsyA9y+CXhAloIq2qJQWZXVD7IKNIaGPDNb2LXXF+59Jp jdQdYK22Ft+Qelx0dh9UDxWNHawTd2ujl1Jy+ZJj9oIcC9LZwfFrdQFvM4d0AeWd9vYl 3tS+FMctJtS+njMBZfqtLykGkVg9NLwNzy8BGdfFIRmcmc/GThlCoAt1JL2kJ0o6uuAU 4cEMjWbGO3Mnzols6qc3vCBk+av/y2dMdZZlxPkLjry2IokzXxr451wSwQjaHv9Y3uJC yE0NXm7NauLYdSbPwQU9FoTykMPd8zCXRI9KmqN0JDMhF3X1n+mxAtjX4aDN3N+siGWq XmAQ== 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=yOIabFl+rrUxB3JsppY65HiHeChwiMk7jYs9jYVA7Ow=; fh=mVwFLgmt4W3HTqIMzqgY0QBfM5RuNHRdRmjfSpBIIOs=; b=Ru5Z70/suOegfytV7d5E51BkQxE1ae7UZD1Iqbu5KwIW7bE11GnxC8XYV4o6HCNKHc SoVoKsK+PWOmtSgOPY17nNfIMw17+bzTAglnBt+Tu+Ak/d27+XUyldt52KxK4SFbSURQ Odx8RqxKydwnXc6uFerw8oOD9FlAsfzXdEcFqnhCLXiiAl65fC6RoCkzjNYMStJ5hJ6z E48MqkLYwiX9uTmE27RMDaY+KALTkCYuROUZy+LefMxBvRIxt4NCtPooWoc7YR8HhSy8 fESIRb/bRdFpp0YE3cQWYRLRWMKeASlT1sWN0+Nh9AFgm/e1N5qvhRtw34KfYcyOj5Pj iSXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pU7AuY1I; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-98814-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98814-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id dv24-20020a170906b81800b00a3e3965250dsi2373586ejb.883.2024.03.11.05.17.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 05:17:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98814-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=pU7AuY1I; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-98814-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98814-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 am.mirrors.kernel.org (Postfix) with ESMTPS id A29E11F21FA5 for ; Mon, 11 Mar 2024 12:17:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2F673D3B8; Mon, 11 Mar 2024 12:17:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pU7AuY1I" 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 C08613D57D; Mon, 11 Mar 2024 12:17:18 +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=1710159438; cv=none; b=tV5/bk9+F4USvMIRziRB0Fr1IJT3s17bEzvHaaPbUEILtRojTaeASNsMIKkIKeVz9Fg6QuuDOlX+j3iZ2TyK7CU2c3wjP5N1FBbkjv+VcFHAod3lwvuXfBxxlbnEWAvoN6K3oarRxm5a5DAcgsKbNYX46FFcy374Vf72nlRnzLY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710159438; c=relaxed/simple; bh=NMP2UXbhXQeXR5/a88AEqvzN4xBbgLW8HHOoxRUmxAA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uz03VrqBseSLmS9s8xviHZaDE7zGaqi9WVdeY8nufYgLQGlbowwo7AoPsS35KIxYXieuWDQ9GoZt3C+G2NimFQ8dJYbPNjpaVt9lUjOPtP6HWGcOnZnr4s0qbTn4UDGgL+IYoJlQo0EFyqZ8f8L2mIWv6eNjVa9hg+ztkwjwEfY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pU7AuY1I; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 83095C433F1; Mon, 11 Mar 2024 12:17:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710159437; bh=NMP2UXbhXQeXR5/a88AEqvzN4xBbgLW8HHOoxRUmxAA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pU7AuY1IuYOk86GJ80t2EfDe7LDmTqOwTKM1IJrUsYV0auWz+TsyNvv/KV2L/CwWR 2xBLpofSgmMfJYTfhi0nMcd4RJgYoEgJVLXbaBUmuN1ZU4a17VAcf8sYD0O/s1wvTn bSKZvW6N+6pw0UgFMEQ4of7kNrsmDbDCjR8EvI4+gTTH/56hhjE5lm+Whpe65TkQR3 CguHexm7mvf0MqNWM8sPpdxfpqUVzv+vx8wQPNVsyBrnhdo6quJNEqbwmLwHyxP/Qk uqUxDYY8Z2L/61Gvbx2XWuioHtxSRzVDQthCZBBcB8DX9voepNuEDszY3Chrh4esDH roAD8TVQ/WdmA== Date: Mon, 11 Mar 2024 14:17:13 +0200 From: Leon Romanovsky To: Dennis Dalessandro Cc: Breno Leitao , Jason Gunthorpe , kuba@kernel.org, keescook@chromium.org, "open list:HFI1 DRIVER" , open list Subject: Re: [PATCH net-next] IB/hfi1: allocate dummy net_device dynamically Message-ID: <20240311121713.GK12921@unreal> References: <20240308182951.2137779-1-leitao@debian.org> <6460dd4b-9b65-49df-beaf-05412e42f706@cornelisnetworks.com> 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: <6460dd4b-9b65-49df-beaf-05412e42f706@cornelisnetworks.com> On Mon, Mar 11, 2024 at 08:05:45AM -0400, Dennis Dalessandro wrote: > On 3/8/24 1:29 PM, Breno Leitao wrote: > > struct net_device shouldn't be embedded into any structure, instead, > > the owner should use the priv space to embed their state into net_device. > > > > 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 iwl_trans_pcie by converting it > > into a pointer. Then use the leverage alloc_netdev() to allocate the > > net_device object at iwl_trans_pcie_alloc. > > What does an Omni-Path Architecture driver from Cornelis Networks have to do > with an Intel wireless driver? > > > The private data of net_device becomes a pointer for the struct > > iwl_trans_pcie, so, it is easy to get back to the iwl_trans_pcie parent > > given the net_device object. > > > > [1] https://lore.kernel.org/all/20240229225910.79e224cf@kernel.org/ > > > > Signed-off-by: Breno Leitao > > --- > > drivers/infiniband/hw/hfi1/netdev.h | 2 +- > > drivers/infiniband/hw/hfi1/netdev_rx.c | 9 +++++++-- > > 2 files changed, 8 insertions(+), 3 deletions(-) <...> > > Leon, please don't accept this until the author resubmits a patch that I either > Ack or Test. Sure, I will wait for your response. Thanks > > Thanks > > -Denny