From: Jeremy Kerr <jk@codeconstruct.com.au>
To: Adam Young <admiyo@amperemail.onmicrosoft.com>,
admiyo@os.amperecomputing.com,
Matt Johnston <matt@codeconstruct.com.au>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Sudeep Holla <sudeep.holla@arm.com>,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Huisong Li <lihuisong@huawei.com>
Subject: Re: [PATCH net-next v25 1/1] mctp pcc: Implement MCTP over PCC Transport
Date: Wed, 27 Aug 2025 09:37:05 +0800 [thread overview]
Message-ID: <9b66a22a2fe689a993d9ff83baf8b7bbecbb8c90.camel@codeconstruct.com.au> (raw)
In-Reply-To: <d15313f4-46d1-4096-bdf1-783afd8e439d@amperemail.onmicrosoft.com>
Hi Adam,
> In addition to the below comment, I am removing the additional lock on
> the skb lists and using the internal one for all operations. It leads
> to leaner and cleaner code.
Ok, neat!
Just be careful with locking as you're iterating the queues. Your
current approach of doing the drain under one lock acquire is probably
the best, if you can do the same with the queue-internal locking.
> > > + mctp_pcc_ndev->inbox.chan->rx_alloc = mctp_pcc_rx_alloc;
> > > + mctp_pcc_ndev->outbox.chan->manage_writes = true;
> > > +
> > > + /* There is no clean way to pass the MTU to the callback function
> > > + * used for registration, so set the values ahead of time.
> > > + */
> > For my own clarity, what's "the callback function used for
> > registration"?
>
>
> Actually, this is not longer true: we can do it in ndo_open, and it
> is clean. Removed the comment.
OK, The current patch *does* do it in ndo_open though, hence my
confusion.
From your other reply:
> > > +static int mctp_pcc_ndo_open(struct net_device *ndev)
> > > +{
> > > + struct mctp_pcc_ndev *mctp_pcc_ndev =
> > > + netdev_priv(ndev);
> > > + struct mctp_pcc_mailbox *outbox =
> > > + &mctp_pcc_ndev->outbox;
> > > + struct mctp_pcc_mailbox *inbox =
> > > + &mctp_pcc_ndev->inbox;
> > Minor: I don't think these need wrapping?
>
> The outbox and inbox lines are longer than the mctp_pcc_ndev line, and
> they depend on it. This ordering and wrapping passes the xmas tree
> check and keeps assignment with declaration.
If you need a specific ordering for actual correctness, no need to
force that into a reverse-christmas-tree. Spacing requirements like that
are secondary.
The only remaining query I had was the TX flow control. You're returning
NETDEV_TX_BUSY while the queues are still running, so are likely to get
repeated TX in a loop there.
Cheers,
Jeremy
next prev parent reply other threads:[~2025-08-27 1:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-19 20:51 [PATCH net-next v25 0/1] MCTP Over PCC Transport admiyo
2025-08-19 20:51 ` [PATCH net-next v25 1/1] mctp pcc: Implement MCTP over " admiyo
2025-08-22 8:21 ` Jeremy Kerr
2025-08-26 20:51 ` Adam Young
2025-08-27 1:37 ` Jeremy Kerr [this message]
2025-08-27 4:55 ` Adam Young
2025-08-26 22:37 ` Adam Young
-- strict thread matches above, loose matches on Subject: below --
2025-08-27 4:48 [PATCH net-next v25 0/1] MCTP Over " admiyo
2025-08-27 4:48 ` [PATCH net-next v25 1/1] mctp pcc: Implement MCTP over " admiyo
2025-08-27 7:36 ` Jeremy Kerr
2025-08-27 17:54 ` kernel test robot
2025-08-29 9:17 ` kernel test robot
2025-08-29 19:32 ` ALOK TIWARI
2025-09-01 0:59 ` Jeremy Kerr
2025-09-05 17:25 ` Adam Young
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9b66a22a2fe689a993d9ff83baf8b7bbecbb8c90.camel@codeconstruct.com.au \
--to=jk@codeconstruct.com.au \
--cc=Jonathan.Cameron@huawei.com \
--cc=admiyo@amperemail.onmicrosoft.com \
--cc=admiyo@os.amperecomputing.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=lihuisong@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeconstruct.com.au \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sudeep.holla@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).