Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1381338lqz; Mon, 1 Apr 2024 04:53:44 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVufFw1/Om4Rkm2Yf1DTIfkdB1JD8fMrGJApx51NEbSYleAXjZv/fwPqF5bSvU+/B9zQU2FARBvKj1nY/OLJHSJ4INKnkvArHQOWJvZBQ== X-Google-Smtp-Source: AGHT+IGGW3JI4/kNPV6kZH+f+cXo+LHgDhPbsZ/n6G9i3VV+3M4wac1QKxFZjP0jN2pxolVYA8Cz X-Received: by 2002:a05:620a:1a26:b0:78b:d6a4:f594 with SMTP id bk38-20020a05620a1a2600b0078bd6a4f594mr9453378qkb.10.1711972424096; Mon, 01 Apr 2024 04:53:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711972424; cv=pass; d=google.com; s=arc-20160816; b=ItSC2dviHnPl8MWbAWIABf3g5b50uZgOgMp7+iHVJ0cfLBYWDGdqpNrDXr8112/ZxQ S2LpofBZsTzM6Vs8IJwdHKWB4Leu5Q+AMdTlJjz0XGh0l8Gm+gCVadoyaS2xCmdgXogw r8NNyyhqOFeFSKlUsUGOzGvVUNSmgY2nUMshU3xbFwatrLuLCNe3+91WosJYs9p7H1OS tU6/lv2nxjnHPoJN8neXjzPsW8pPmaYrj5LDGozPW3iVxshpWZbwOO3Jd85puMP5w+dT Zq/SuBRARvcyj04KiqnjSDjF4o28ks/KX1vL7Xt/QdeZzDWhmnOA77kLDjaum15b8ehE u+gw== 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=2NkguieXVPY2tJi3+zeubPYVAMLr8uM6FOkyEc7TsHU=; fh=KAJUH090G9sCmeeAoQoROF1a1cHlZ7p3EIjntqE43fY=; b=msg/NqW2d+V63i5vCqK3PcLgEDc9sarAQ6R0iYD6Ndy0Hu/Ub/EQYfULFJVsZ47AGI FPPzZOzdOHUtGWUoDlis2EfgygznuH8Lf8/diPHiQ5bWHcillg/NuK4iNvbDlmJGpZiu 0HbWc+qERQytwM8zmfTJcRnPIbgn940DZ0Hvp0oxRbdpj99UlFoQ3xFql6GibU75wU+K 4arHza5qKJfSLw5kd9wCaryJA93uXuEVeCKHloG0FLXezbXbYmtqEEHq9ow85HqHyxRX COSmGM5AeiI9xMkcDxdrP0JYmUlbiIPzoQ+fpZ1xz3QaLnE4J6ZhpNB+Wna462LGHSNn xmnA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fGwQK2jl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-126637-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126637-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id s17-20020a05620a081100b0078bcb61e380si6808037qks.352.2024.04.01.04.53.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 04:53:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-126637-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fGwQK2jl; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-126637-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126637-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id CD3321C20E87 for ; Mon, 1 Apr 2024 11:53:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 88ECE224C6; Mon, 1 Apr 2024 11:53:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fGwQK2jl" 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 ABCC021340; Mon, 1 Apr 2024 11:53:35 +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=1711972415; cv=none; b=B3cA+TQ9q3UqIwaP9PQVPCVksqWgLWN9mHwE53lMe166qajd0wIMVFjnToqjZIcN6WsbSAbdN/ihDpVI4SsYDCC0h2WW+LzVHMUvvnIf5G9pyLKq+sE9FwddcmIkE+8d9YQFVha9FIWtby4mN1yrA0n2k0uaDtMJro0XpcWNKzY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711972415; c=relaxed/simple; bh=9uVLf3becGVUgjaaJtEsn16D5M1Pat2+PNKbE6FqNes=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lBR1bn4E/K/oHZqSqZBZi07lQtId6xTb4bsQnqTPZVmcn1ybqf4nXV4H8B+DhJOwrgiO4E+reBBLGDuIPWTad8erBRbCuIInm96eBkGsi3eUfuy21RxGbMBunSRrBgAnXw5tmbzJgIihbQRFGq9iOT4Pi/zyteSnsPrqUizVlbY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fGwQK2jl; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 46CB8C433C7; Mon, 1 Apr 2024 11:53:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711972415; bh=9uVLf3becGVUgjaaJtEsn16D5M1Pat2+PNKbE6FqNes=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fGwQK2jlRWX/sZ8JVLzM1IzKZ5E6GVNsKVM7vYSmcJtgBh0jrdZRkOc2rYMK6TBny rVpslyeWYSprKJYxGn0ir5Sil+Zqrm3UCrBMrSXYoJVCa4tvUUJSV1RFQIyYewpffS HFIb4qiOwQaExPz9vy7nxGZtShhuby1y7fgFZO4I5o8GcGsaHJcT/HeqC5ghwUVV8I cAmiL0C2wSMwKo35aegmpLkC0Xm8Ty3yVaXlxYhWr2Z6JAy5EriVn9yDP4sIHBII/u Uku4yGj05z0Z1vxiY7u2Cyt4oJF1KYFUgg834fN5Cl0vvQyRvYT0acOKLAz6yIJ7Zs twlPxQqj7UNtg== Date: Mon, 1 Apr 2024 14:53:31 +0300 From: Leon Romanovsky To: Jakub Kicinski , Breno Leitao Cc: Dennis Dalessandro , Jason Gunthorpe , keescook@chromium.org, "open list:HFI1 DRIVER" , open list Subject: Re: [PATCH v4] IB/hfi1: allocate dummy net_device dynamically Message-ID: <20240401115331.GB73174@unreal> References: <20240319090944.2021309-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: <20240319090944.2021309-1-leitao@debian.org> On Tue, Mar 19, 2024 at 02:09:43AM -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/ > > Signed-off-by: Breno Leitao > Acked-by: Dennis Dalessandro Jakub, I create shared branch for you, please pull it from: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/log/?h=remove-dummy-netdev Thanks