From mboxrd@z Thu Jan 1 00:00:00 1970 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 CFA3D3AC29; Tue, 17 Oct 2023 08:24:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="B4i8S7Ql" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC590C433C7; Tue, 17 Oct 2023 08:24:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1697531072; bh=tom3LKzD4WPrxoOMlWcXOkaTJL2PCHAzD27eMGNLLx8=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=B4i8S7QlyOLUBlWGp+GiUJgclkY3/COY8qdGHgBtegTU+FIthCnqN1sks4Wchm3n+ ZvLhRotboqIec8IrsiX8StkvY4QJl3p4YXrPQVGfgaoHYG1bFBjhxJ+Ww/ONHwroue 0t75VJowGk0w74kGckXoH6NbFcXcxzh+HFcGYmJr0mLmxQE6j6rVQ5OrmeojfNONZH T3iu192hCqs6kySjc+Uj40AIw5DsnzDb93EbLE5YY4/638MN7PB8cIMdmkLlZIVfqA h6lrn+w3I8cJD9cTR8PM5mEbk2VFNLkfR60BwGxBHADfAA5y16nMXhRB0e4sv/bfcc 5aX79Mq2hXhnA== Date: Tue, 17 Oct 2023 10:24:27 +0200 From: Simon Horman To: Matt Johnston Cc: linux-i3c@lists.infradead.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, "David S. Miller" , Jakub Kicinski , Paolo Abeni , Eric Dumazet , Jeremy Kerr , Alexandre Belloni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , miquel.raynal@bootlin.com Subject: Re: [PATCH net-next v6 3/3] mctp i3c: MCTP I3C driver Message-ID: <20231017082427.GH1751252@kernel.org> References: <20231013040628.354323-1-matt@codeconstruct.com.au> <20231013040628.354323-4-matt@codeconstruct.com.au> Precedence: bulk X-Mailing-List: netdev@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: <20231013040628.354323-4-matt@codeconstruct.com.au> On Fri, Oct 13, 2023 at 12:06:25PM +0800, Matt Johnston wrote: > Provides MCTP network transport over an I3C bus, as specified in > DMTF DSP0233. > > Each I3C bus (with "mctp-controller" devicetree property) gets an > "mctpi3cX" net device created. I3C devices are reachable as remote > endpoints through that net device. Link layer addressing uses the > I3C PID as a fixed hardware address for neighbour table entries. > > The driver matches I3C devices that have the MIPI assigned DCR 0xCC for > MCTP. > > Signed-off-by: Matt Johnston Hi Matt, one minor nit below, which you can take, leave, or leave for later as far as I am concerned. Overall the patch looks good to me and I see that Paolo's review of v5 has has been addressed. Reviewed-by: Simon Horman > +/* List of mctp_i3c_busdev */ > +static LIST_HEAD(busdevs); > +/* Protects busdevs, as well as mctp_i3c_bus.devs lists */ > +static DEFINE_MUTEX(busdevs_lock); > + > +struct mctp_i3c_bus { > + struct net_device *ndev; > + > + struct task_struct *tx_thread; > + wait_queue_head_t tx_wq; > + /* tx_lock protects tx_skb and devs */ > + spinlock_t tx_lock; > + /* Next skb to transmit */ > + struct sk_buff *tx_skb; > + /* Scratch buffer for xmit */ > + u8 tx_scratch[MCTP_I3C_MAXBUF]; > + > + /* Element of busdevs */ > + struct list_head list; I am unsure if it is important, but I observe that on x86_64 list spans a cacheline. > + > + /* Provisioned ID of our controller */ > + u64 pid; > + > + struct i3c_bus *bus; > + /* Head of mctp_i3c_device.list. Protected by busdevs_lock */ > + struct list_head devs; > +}; ...