Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp123029lqz; Fri, 29 Mar 2024 10:28:28 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVGkvJUyXrzLndreWepwVOOenHpeMc4cspvU/LXmCCYuuXJMF5UIx7rNIFGxupzX/xC8crT9oqc1SyGxsv1DB4Ts0+DhuzVylt54sV+JQ== X-Google-Smtp-Source: AGHT+IFzo1u7tgHnyx2Z4dQhqpBxWvjr0ssZyLVscch3Mg3GBuPjduidUipb8SvxYrk8p5kCSu4b X-Received: by 2002:a17:903:986:b0:1e2:36f8:bae0 with SMTP id mb6-20020a170903098600b001e236f8bae0mr1839996plb.54.1711733308481; Fri, 29 Mar 2024 10:28:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711733308; cv=pass; d=google.com; s=arc-20160816; b=aLHhE+TQ9bYG48709apys0FsqVW+Ti+oEOkfTwt8U1Hvue/VLUmRhpHwJf0k4dTRyc eK48B9UaBUM8AOaJ3AUp5op7MvB1FvgjLQPvUfSTAukf5dHoyKw9pUBgUolpTS+SX0Dc qOZEjJPwNzzoh2btvbqz+I49NJYYut5dw4aP2cl761hxjNBdxHg5mpw9vGWHWMn5O5dh wI9wnheahpx0AvA5jhaRySoVswroZr2X7D/BqI+Jg+ytVh0nTGKXOjDbP1WhbU9h85AD YHn7gx41EAh6yxs/psf54aYkTv/Fj5TeboOO2C0LijsNGlpEnCrY6z3pmVci4S/xgGil I3rw== 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; bh=wWTNK+PNnGTgTs2Ks00fI39OgjfjTZnHwFsoUqKid1M=; fh=lJv2fWiq3auGfKS1nmP4RciC9CxJmwnLiZSbNituRKA=; b=aoQqh7J0+Nj7SrHdIDgfcQ9aFcazWajAycnbY4df+r6/s8LScTRAF7cE7Ke8FcCpJx lk+b7uo/LHIE7QdRQf0tBfn7FOPnwVwMDL1HW/XJ2N7ekq54pJfzwd8+QtI4ngm2LHzs Dzj1I/lTy7rIbKnL3EuR7bJhhdJTe21ONTt5Guj4Wd2apzJ0p6zYP2yg7WLcSdi+5/5Z P6t3K5Oy4jk5FhCv1mu1/SmDTsYNZ/kJsgqj/8fx35lZD8qnfBo5Wohxqi9Lc1eTTRa0 9A41vPqUClRmkEt1XeTT6PHa1AKG0OYpVdgqb7ljWK/+vQjTeo/UOtPY4w42G25R0L6v BYLw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-125234-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125234-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l6-20020a170903120600b001e098ad43d7si4138596plh.216.2024.03.29.10.28.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 10:28:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125234-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-125234-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125234-linux.lists.archive=gmail.com@vger.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 79DC128AB87 for ; Fri, 29 Mar 2024 17:22:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1C14112FB27; Fri, 29 Mar 2024 17:21:59 +0000 (UTC) Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E63591C0DC0; Fri, 29 Mar 2024 17:21:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711732918; cv=none; b=rtyRAUkUqKXJWfUvLoeIloX5PlSsLxSAqJsyX0DmnUmO2Km+NooadmqbGLxKW6DYBRO7oZ4TfhobWgkUCsjj89bGnZ1XFk1YvsFPvsMQoFd4hDP9U+gaPwQiencu/LiFpsEWW9nlQXVpJm7SM/sXqhBjXX3ahEKB7addjBKkx64= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711732918; c=relaxed/simple; bh=VAZUIHroRXLR2qYb54Uc+5XzuFX5yye1KGM0aNQugsE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=TUej3Svlus2KP2Oz0u8Liw4aihVkCrfaYW//Yp34g5fDgtDzHKpB1/+oMrcwR8+X/GthbuD8mMICgV5NFqsiKLGbruQhoqKaC6eohZWLgchrmGryU8Wn9QefMjnUdgUohESab2tt9ATrPhD1fGnPSEMX+HfnBAP9jDCuExceEwA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org; spf=pass smtp.mailfrom=gmail.com; arc=none smtp.client-ip=209.85.218.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=debian.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-f41.google.com with SMTP id a640c23a62f3a-a2f22bfb4e6so297350066b.0; Fri, 29 Mar 2024 10:21:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711732915; x=1712337715; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wWTNK+PNnGTgTs2Ks00fI39OgjfjTZnHwFsoUqKid1M=; b=izXeBXbcP7pm+veWDCBVKzdNKF9mqovkkUrQuwwxYWmCnPrLVkSLlC/iOwoVtv9ulg JOtvA2p++RihUChVbhRkuMu+dqzc13pWX/IWwInuQIbin8MMrKl+XzwkaYwr5W0ZDkwa 9nCMBtjKTSv98an0JUqsmKeTjTi6j6GcAVbwnyiA26imwcwhXd3WouTdIM0Sf/NICDAJ I20wv2/SbbV/+gSCsd2PtJUnnUiMHe23lviyVGtr6EWheYilITy3tgiH7V6w+mw3Vu8C z/9eX9619Dw0yzGaSlcgOKJby4CTx1CYzPkUI0XK5xY1xGT8LyhMOdEVyMSFRSElxhZo MtXg== X-Forwarded-Encrypted: i=1; AJvYcCVIq7q/z1RYGtRhSyaQsLIl2IHg1OmzkvPK2OFTjY19StdwwKmbi/K0nmHTsCAv6neGZp55VeuTfyUTdCYTmOOcIMTJKsjwPMqXeCAFSdPIByLXLtzGfjKun2tXVPo1icF2JlLG X-Gm-Message-State: AOJu0Yy/9fo2Y3FZb7Umr2s5uw5Rl3/BayDuQF5CHJFG0oqMEEatzrxK wBUZ+RyazmL5bXGOQdJ67DLk3ueFWwbQevAiz+tj/QUSTo4b2CTC X-Received: by 2002:a17:906:3a91:b0:a4d:f555:fd6 with SMTP id y17-20020a1709063a9100b00a4df5550fd6mr1723080ejd.29.1711732915068; Fri, 29 Mar 2024 10:21:55 -0700 (PDT) Received: from gmail.com (fwdproxy-lla-005.fbsv.net. [2a03:2880:30ff:5::face:b00c]) by smtp.gmail.com with ESMTPSA id h18-20020a17090634d200b00a44b90abb1dsm2132929ejb.110.2024.03.29.10.21.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Mar 2024 10:21:54 -0700 (PDT) Date: Fri, 29 Mar 2024 10:21:52 -0700 From: Breno Leitao To: Jakub Kicinski Cc: aleksander.lobakin@intel.com, davem@davemloft.net, pabeni@redhat.com, edumazet@google.com, Taras Chornyi , quic_jjohnson@quicinc.com, kvalo@kernel.org, leon@kernel.org, dennis.dalessandro@cornelisnetworks.com, linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: Re: [PATCH net-next v2 2/5] net: marvell: prestera: allocate dummy net_device dynamically Message-ID: References: <20240328235214.4079063-1-leitao@debian.org> <20240328235214.4079063-3-leitao@debian.org> <20240329085633.2cfae5e5@kernel.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: <20240329085633.2cfae5e5@kernel.org> On Fri, Mar 29, 2024 at 08:56:33AM -0700, Jakub Kicinski wrote: > > @@ -682,6 +690,7 @@ static void prestera_sdma_switch_fini(struct prestera_switch *sw) > > prestera_sdma_tx_fini(sdma); > > prestera_sdma_rx_fini(sdma); > > dma_pool_destroy(sdma->desc_pool); > > + kfree(sdma->napi_dev); > > Why kfree()? Let's use free_netdev() consistently, in case one day > we have to undo something alloc_netdev_dummy() has done. I should have used free_netdev() in fact. I will update.