Received: by 2002:ab2:1689:0:b0:1f7:5705:b850 with SMTP id d9csp2068037lqa; Tue, 30 Apr 2024 07:25:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWd/hAV68tWG1Ln8Od1lFXEDee2edRIPyBOyUdwOICTsLP6RO0EDbuR89PUESC/x+Rsm82Ho+Nz9YWsR5BCBPDCldj0QqSK0A0TnXJ9lw== X-Google-Smtp-Source: AGHT+IG8pNdlKz650jtUHZceSoDlnDYDYh4/dOjm3YSdl3SmLVQ2HJ7O3JiBtheuvLjjsgigN92n X-Received: by 2002:a05:620a:3713:b0:78f:1480:3690 with SMTP id de19-20020a05620a371300b0078f14803690mr16795396qkb.54.1714487122746; Tue, 30 Apr 2024 07:25:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714487122; cv=pass; d=google.com; s=arc-20160816; b=hQNJOxVF6+Ch3Ky4KzdcmEt5NSzl+PAAAlj7bXnOd0Crnwjxtfeki54bSa0mc7UxJA eW/VRpeuX+GOrZhhNMGR/ASwhTwQ4O7iIikCnaUO67mfwynLDDvx4abRVI1aQ8EPXcuc s7/xZz7RKLHt8QZDX7t5USB3rjIli2YRa8tIoVGWncBtmfkNgaz2t3yBk2UlN59Sbhqn 65M7h7G7ru0V8VBdEkgwfFF0NhcsLy6/GJM2kP2hYhbh0rQ8Q666V+X9lFhRddwoTV8P /JDkDcJiNdmvGK+X9hgXMgBHKDwayYpIQ+M4UixmK8YLZXI5jdRFt/v9X4/luDuelao+ UC5w== 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=/zDcyPYVHndsGqg4cSBsO8BncBM9eV5GRvnfMJyy214=; fh=X9eEkEyX9770QgMWGnFQeLywJzA+2R6sqVit6hAFO08=; b=tJZY5uLX1bei/myQEtimmOlVOOgn2X53stEQw7o/UdussZiRmeTGNwi8ZMjCb3YhPm WlV04B0ImkwuuvSd5P8nOwIR4thZSE/PFKcax8+QmhnDDFNpbQrrgoC9tfvSEzji1b0M BWMiL0JWXo7wLRFXptgkkJfeaJIVesPSc7GwKULmjQw+UvLbdav1nkeG7jN7HKTasRFA f8mi3ceJfpTh98k7FIfULrnX0Fj3jd1//NozZACsEGfo2ZqFWk4jA7mVGDuk3XaQRD3w Xhay4q4rdClfi8xrU+4t8QZ/218IVuZmdSCeHq1bHyryit+rH0bXkbl3YPOMkBZsEkBZ 5n9g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=aSACFgJC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-164115-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164115-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 z20-20020a05620a08d400b0078fbed4e057si25523763qkz.437.2024.04.30.07.25.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Apr 2024 07:25:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-164115-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=aSACFgJC; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-164115-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-164115-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 7677F1C22AE4 for ; Tue, 30 Apr 2024 14:25:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DABD01527BC; Tue, 30 Apr 2024 14:10:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="aSACFgJC" 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 DE8D41527A8; Tue, 30 Apr 2024 14:10:44 +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=1714486245; cv=none; b=dizTcLNXf+RtLwVD/uwLd9ZtMtFKp2WTwru1BhFxrWvWu/gmVwNuYsn8aThuWspVGJnb0uJupsiR++SWzQU/4fuPofI2SJ+TrwnHbVIX1BYuC9vtGcEW/CntVgTcSq0yxVEK7DU2/sJWgEMH40/Fc+dPTLj06ILX3YUPxgfnVxE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714486245; c=relaxed/simple; bh=DFmZGaD+ssIlT/B33ege35Nl6ftG7eXESOlm0ucRd2w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=nBr1q76jqfm7q1ynBOcWKPhRsSITQx3U5sCUyht1NbEN5JCiIX4bOPrpynXll6H6ffDHdgyq1co58KF3R99a04I8SU6V1cZ0k5t5FE/wRDdDhsgk34D66JYenfttkpR3CcpQbKUTuGV79UywplM1XqkjpBzZCAmc93+p4RDgZEI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=aSACFgJC; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id C062BC4AF18; Tue, 30 Apr 2024 14:10:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714486244; bh=DFmZGaD+ssIlT/B33ege35Nl6ftG7eXESOlm0ucRd2w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aSACFgJCQTsoJH/MwklGL5d7BwvIk3JQvTZDjrN0140y44hhz89HBuA3VIZDS5Mxc DvBjVPJgfcsB6bdcfVi0ZplDPtKc3skOo1Dec3otryzUn8rV8jCHj+89IdFSloUjt1 sHkPEng63oLz266ELuP4YDqKvgbiW3B3Hdpb0T60+RTKVGrwjlgNhC2XuS2Sl8XO2k JgyOWWhp5pax4oP4TpKTwY8Ht2lVvokqjd0bPcSDYzgQPuJ01PT2zcirBkFdeOxs8C sJBB1Gup943xkk+kKygTScyvi8VN2IluNEmeThT0DZmRQBZ93b2vcCCD5n0JoxLg/M e7ljDuWXHqRxA== Date: Tue, 30 Apr 2024 17:10:39 +0300 From: Leon Romanovsky To: Dennis Dalessandro , Jakub Kicinski Cc: Breno Leitao , Jason Gunthorpe , "open list:HFI1 DRIVER" , open list , linux-netdev Subject: Re: [PATCH net-next] IB/hfi1: allocate dummy net_device dynamically Message-ID: <20240430141039.GH100414@unreal> References: <20240426085606.1801741-1-leitao@debian.org> <20240430125047.GE100414@unreal> <49973089-1e5e-48a2-9616-09cf8b8d5a7f@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: <49973089-1e5e-48a2-9616-09cf8b8d5a7f@cornelisnetworks.com> On Tue, Apr 30, 2024 at 10:03:49AM -0400, Dennis Dalessandro wrote: > On 4/30/24 8:50 AM, Leon Romanovsky wrote: > > 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 > > Nothing right now. Should be safe to sent to net-next. Jakub, can you please take this patch? > > FYI, since I talked about it publicly at the OFA Workshop recently. We will be > starting the upstream of support for our new HW, soon. Great, thanks > > -Denny