From: Adam Young <admiyo@amperemail.onmicrosoft.com>
To: Jeremy Kerr <jk@codeconstruct.com.au>,
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: Wed, 23 Apr 2025 14:25:57 -0400 [thread overview]
Message-ID: <b254a359-0ca8-463b-b666-e34ba357bd09@amperemail.onmicrosoft.com> (raw)
In-Reply-To: <7b5ed6452d077e65005010c81eaeb3124d1e9feb.camel@codeconstruct.com.au>
On 4/22/25 10:15, Jeremy Kerr wrote:
> > + 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?
I based my code off the other drivers in the same directory:
rc = skb_cow_head(skb, sizeof(struct mctp_i2c_hdr));
if (rc)
return rc;
rc = skb_cow_head(skb, sizeof(struct mctp_i3c_internal_hdr));
if (rc)
return rc;
However, I just noticed the USB one, that went in last release, does
this (using a goto)
err_drop:
dev_dstats_tx_dropped(dev);
kfree_skb(skb);
return NETDEV_TX_OK;
Seems strange to returning NETDEV_TX_OK for what is essentially a memory
allocation failure? However, I am going to assume that this most recent
one represents the current wisdom, and will follow suit.
prev parent reply other threads:[~2025-04-23 18:26 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
[not found] ` <7b5ed6452d077e65005010c81eaeb3124d1e9feb.camel@codeconstruct.com.au>
2025-04-23 18:25 ` Adam Young [this message]
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=b254a359-0ca8-463b-b666-e34ba357bd09@amperemail.onmicrosoft.com \
--to=admiyo@amperemail.onmicrosoft.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=admiyo@os.amperecomputing.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jk@codeconstruct.com.au \
--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