From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 1EA011EF363; Fri, 15 Aug 2025 03:59:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755230383; cv=none; b=V8yqvHsVLTVOI36OqCdK7h6vTLb/GWSNRbzJtaTbMRRV+mEHNxP6ZvjEElkOF+pzNRKXk0kcvzlqAkJ4+MkoinIJe/+t3JyFxpf35dZsSNMDJCVJVXkmCBxEohYF3QKb50bzB5nUwX+TxphEJU35Y2skl71Kwt+mWZ+0doihHLY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1755230383; c=relaxed/simple; bh=kPJZHkRl67MdXimofnFj0jTr/olecrzNQIOZqm6ZG7s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=lFmCFmwsC1gPYS/MqoiR20HOszg66ON1mGeFBhFM+QNYhNNw4sx37sKanT+pXoyUrMvXXN2c1PH7qH04O5phEcOM9uJNzrJEg/ZT5n+ZXJdmXckD3AP/7Z5e+nkHLsHbrxCMMcuKEgV5/LrOqOHJf55WbMu8MET4Xtpp02+HASQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=L759qInR; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="L759qInR" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=0ijtC+od+j6wKU/K9psCeb8GHjGqN3InOPyIxvk1z8g=; b=L759qInRwQPWOUL7lLt5YlCMWc PXrc450CcmgOsPrWLC27Px3F8nFPUOw6x3cNKLZuqn8QKVWq+0vAFL6nT+cQTb6mH0mmOXivICaBW bRAr/Xp1up3hb5ix4jimjvEzaGVz27rt/vJz0NSH1DFL5Py4NhI1wVSkbuifmQ4pEwiA=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1umlaw-004mfA-Sc; Fri, 15 Aug 2025 05:59:10 +0200 Date: Fri, 15 Aug 2025 05:59:10 +0200 From: Andrew Lunn To: Yibo Dong Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, corbet@lwn.net, gur.stavi@huawei.com, maddy@linux.ibm.com, mpe@ellerman.id.au, danishanwar@ti.com, lee@trager.us, gongfan1@huawei.com, lorenzo@kernel.org, geert+renesas@glider.be, Parthiban.Veerasooran@microchip.com, lukas.bulwahn@redhat.com, alexanderduyck@fb.com, richardcochran@gmail.com, netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 3/5] net: rnpgbe: Add basic mbx ops support Message-ID: <19d66fa8-f42c-4c52-b42b-49994f29e293@lunn.ch> References: <20250814073855.1060601-1-dong100@mucse.com> <20250814073855.1060601-4-dong100@mucse.com> <497996B7269F1229+20250815024302.GC1137415@nic-Precision-5820-Tower> Precedence: bulk X-Mailing-List: linux-doc@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: <497996B7269F1229+20250815024302.GC1137415@nic-Precision-5820-Tower> On Fri, Aug 15, 2025 at 10:43:02AM +0800, Yibo Dong wrote: > On Fri, Aug 15, 2025 at 04:13:52AM +0200, Andrew Lunn wrote: > > > +const struct mucse_mbx_operations mucse_mbx_ops_generic = { > > > + .init_params = mucse_init_mbx_params_pf, > > > + .read = mucse_read_mbx_pf, > > > + .write = mucse_write_mbx_pf, > > > + .read_posted = mucse_read_posted_mbx, > > > + .write_posted = mucse_write_posted_mbx, > > > + .check_for_msg = mucse_check_for_msg_pf, > > > + .check_for_ack = mucse_check_for_ack_pf, > > > + .configure = mucse_mbx_configure_pf, > > > +}; > > > > As far as i can see, this is the only instance of > > mucse_mbx_operations. Will there be other instances of this structure? > > > > Andrew > > > > Yes, It is the only instance. Not other instances at all. > Is there any improvement? So throw away the abstraction and call the functions directly. Only add abstractions if you have some differences to abstract over. Only make the driver more complex and harder to understand, if you need to make the driver more complex and harder to understand.... KISS. Andrew