public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Kerr <jk@codeconstruct.com.au>
To: 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 v19 1/1] mctp pcc: Implement MCTP over PCC Transport
Date: Tue, 22 Apr 2025 22:16:27 +0800	[thread overview]
Message-ID: <cb1a24ef23523f01868127430dbbe48428ad5e0d.camel@codeconstruct.com.au> (raw)
In-Reply-To: <20250418221438.368203-5-admiyo@os.amperecomputing.com>

Hi Adam,

[resend, un-HTMLed. Sorry for the noise!]

One bug in the code, and another couple of notes since we'll need a re-roll:

> +#define MCTP_PAYLOAD_LENGTH     256
> +#define MCTP_CMD_LENGTH         4
> +#define MCTP_PCC_VERSION        0x1 /* DSP0253 defines a single version: 1 */

Mismatched DSP reference above - DSP0253 is serial.

> +static netdev_tx_t mctp_pcc_tx(struct sk_buff *skb, struct net_device *ndev)
> +{
> +       struct mctp_pcc_ndev *mpnd = netdev_priv(ndev);
> +       struct mctp_pcc_hdr  *mctp_pcc_header;

Another double-space has crept in here.

> +       void __iomem *buffer;
> +       unsigned long flags;
> +       int len = skb->len;
> +       int rc;
> +
> +       dev_dstats_tx_add(ndev, len);
> +
> +       spin_lock_irqsave(&mpnd->lock, flags);
> +       rc = skb_cow_head(skb, sizeof(struct mctp_pcc_hdr));
> +       if (rc)
> +               return rc;

This will return with mpdn->lock still held.

And should this return the raw rc value? Or NETDEV_TX_OK?

Cheers,


Jeremy


  reply	other threads:[~2025-04-22 14:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-18 22:14 [PATCH] mctp pcc: Implement MCTP over PCC Transport admiyo
2025-04-18 22:14 ` [PATCH net-next v18 0/1] MCTP Over " admiyo
2025-04-18 22:14 ` [PATCH net-next v18 1/1] mctp pcc: Implement MCTP over " admiyo
2025-04-18 22:14 ` [PATCH net-next v19 0/1] MCTP Over " admiyo
2025-04-18 22:14 ` [PATCH net-next v19 1/1] mctp pcc: Implement MCTP over " admiyo
2025-04-22 14:16   ` Jeremy Kerr [this message]
     [not found]   ` <7b5ed6452d077e65005010c81eaeb3124d1e9feb.camel@codeconstruct.com.au>
2025-04-23 18: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=cb1a24ef23523f01868127430dbbe48428ad5e0d.camel@codeconstruct.com.au \
    --to=jk@codeconstruct.com.au \
    --cc=Jonathan.Cameron@huawei.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