Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp1381439lqz; Mon, 1 Apr 2024 04:53:59 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVdPKUrcgel+A07C8xQMDcW58636VqnsQminbLz2j+XrtLGc7P46nPNqqEmYNR5vgs6+ZAOJKkLqKP8IGc8UXNLJDMxSNsUYA3wXLtmzw== X-Google-Smtp-Source: AGHT+IHbwRIsp80IxFbHv8D8IFFvgm/uz/TOXzNuoSRJP7VxTcWaMuA5r87/2Vb/GdvNuNLfyetD X-Received: by 2002:a05:620a:f0c:b0:789:dc1e:3a52 with SMTP id v12-20020a05620a0f0c00b00789dc1e3a52mr11747628qkl.28.1711972439011; Mon, 01 Apr 2024 04:53:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711972438; cv=pass; d=google.com; s=arc-20160816; b=AM5kNEsZZkron1NrEZHw2tryBUWbnynbCr2eaBWKLcnUSip5PHXj6/588SofBBpWnK 7U7HuFNrjSsNVqu97akYLiGF2eVoNF26IXB2F/k5rnCKRWujYcG2oLAsrDj9eFcclmLd 3xJyyZHt0Vsm7iSRGoNew7uUMA2pvLXajJE9m6JPRYQSiN1FbyjjMCuvvvFdiiSyGwOo 53PptvaVEae7GcRTvT09Wr2bP+mCO57RksPbSNl6L8A56pyzXyT3aylEPg/uYPG0Wm2H ywkCH2MI9WWwk8PifoSbD5YHT7jX2Ifdj/dgFneZIxQFpu1R6XieWAMH7ULEbkIUwIUc ARCg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:subject :references:in-reply-to:cc:to:from:dkim-signature; bh=bRAYgx+Ew7n1rKs/coLRgxY2WkqbKFectYM3VGkOzJ4=; fh=C6ZpvjmNFYSRXbOTrOMWpDvMUUsOZgUaPBViz/wQFO4=; b=ejmFes/XjHSqAI5xBMKRS0AuAiEMvIJGn+Qzfj/2N2PViPhihSUAzFdu97hDt4+sK0 tIkOL+4PMicQKKjkeP9vuLFIdHoB/dmyrZGnMTLLvlFt9Oik6ge/IH4vpURxxHmAyVfe jYUzxepi5vgH8bsFqb2g275z9BoUv4CBT+vT58MSiOGIMk7tDZXsYGYhacC4TI+GLxS4 lmZCPRYgT8QDDozW8SoS6jJ0wnfG+ubfdGATY+bpi39Bpam97wSq8K8a7e6HmmR9VwfC BiQ+4Vfu2IkvnGrZ5w/oQWX6Pof3aHd3UIyluj+VfNagtwgw+6UDZ431fWui9F/bT6x1 MEwA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ToaB1wA5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-126638-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126638-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 xz7-20020a05620a5e0700b00789e51e8cbcsi9219911qkn.752.2024.04.01.04.53.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Apr 2024 04:53:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-126638-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=ToaB1wA5; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-126638-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-126638-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 63ACD1C20EDB for ; Mon, 1 Apr 2024 11:53:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 09AF8224C6; Mon, 1 Apr 2024 11:53:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ToaB1wA5" 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 3099C219E0; Mon, 1 Apr 2024 11:53:51 +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=1711972432; cv=none; b=flcpVPaRyxDRNafmJKEXr35r0Q/a//OVbQE/kt3PpNblrm0EHDXbe4R20YO131moGazA5BSQQpIqAB6rRNcYbAz9bpRzwypuuSXwj2L4/A2xRs13Ri+qXwJEANWl/LKnMJWS+4MnqIJUJUUaSpfVu9eQwIOP35/aW5h+UTFuNHk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711972432; c=relaxed/simple; bh=BeyIIZe+gftamRnznrps10v2YP0dN37xtl8idY9zoK8=; h=From:To:Cc:In-Reply-To:References:Subject:Message-Id:Date: MIME-Version:Content-Type; b=qf3pFT4u4x3gXHEcyhlmZ9rh+uVTuw5twoeBFTGHzFSK+ce74q9rslTtufYimLcN8TqOEQCEhy9f9R9UF07SUYSfxMC+WWx/u06N+605A8xOlnYOz0j6V+VXv2rWzbRagKoM3E4CpgaJbg8wTEC4GiCF1JWfYQuQf01SxYrRDWI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ToaB1wA5; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 472E1C433C7; Mon, 1 Apr 2024 11:53:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711972431; bh=BeyIIZe+gftamRnznrps10v2YP0dN37xtl8idY9zoK8=; h=From:To:Cc:In-Reply-To:References:Subject:Date:From; b=ToaB1wA5b0M7IoWSUmnzHo8Yx82Xh2nZ61kDkIJc/vZTpJB0HAU0SnwCDxfZG07L0 BIpY6mt3rD/WAJ+nk0TbUYOCS4URHSazDA5X8wVTasy8lZYeoNbIYISFUs2kIbnInX wVVx0EzfMVF7yhSRgjkxbiG7Tvbfd88bbEexK94rXaJUqhXwITMFcY2OAb3zNyEOKI XY3LnZVLiH09KxcDvm8aGkHez4STy2UhcNtovLVZlrpkKu0/m6nbDBAF3Q5RpDu8k7 n5CZEOUsuIMv+7hxkFdQx1elgW9FmKCLSZU35fiYlexGkJPuY3G/+p0fc1bVIhkL5t 2ZJlU2fDwTMng== From: Leon Romanovsky To: Dennis Dalessandro , Jason Gunthorpe , Breno Leitao Cc: kuba@kernel.org, keescook@chromium.org, linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240319090944.2021309-1-leitao@debian.org> References: <20240319090944.2021309-1-leitao@debian.org> Subject: Re: [PATCH v4] IB/hfi1: allocate dummy net_device dynamically Message-Id: <171197242851.77676.14242528699640486562.b4-ty@kernel.org> Date: Mon, 01 Apr 2024 14:53:48 +0300 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="utf-8" Content-Transfer-Encoding: 7bit X-Mailer: b4 0.14-dev On Tue, 19 Mar 2024 02:09:43 -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(). > > [...] Applied, thanks! [1/1] IB/hfi1: allocate dummy net_device dynamically https://git.kernel.org/rdma/rdma/c/c965b039a750c4 Best regards, -- Leon Romanovsky