From: Jeremy Kerr <jk@codeconstruct.com.au>
To: Jakub Kicinski <kuba@kernel.org>,
Jian Zhang <zhangjian.3032@bytedance.com>
Cc: netdev@vger.kernel.org, openbmc@lists.ozlabs.org,
Matt Johnston <matt@codeconstruct.com.au>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] mctp i2c: notify user space on TX failure
Date: Thu, 14 Nov 2024 11:13:33 +0800 [thread overview]
Message-ID: <da9b94909dcda3f0f7e48865e63d118c3be09a8d.camel@codeconstruct.com.au> (raw)
In-Reply-To: <20241113190920.0ceaddf2@kernel.org>
Hi Jakub,
> > @@ -551,6 +552,14 @@ static void mctp_i2c_xmit(struct mctp_i2c_dev *midev, struct sk_buff *skb)
> > dev_warn_ratelimited(&midev->adapter->dev,
> > "__i2c_transfer failed %d\n", rc);
> > stats->tx_errors++;
> > +
> > + sk = skb->sk;
> > + if (sk) {
> > + sk->sk_err = -rc;
> > + if (!sock_flag(sk, SOCK_DEAD))
> > + sk_error_report(sk);
> > + }
>
> notifying socket in the xmit handler of a netdev is a bit strange,
> could you do it somewhere higher in the MCTP stack?
Sounds like that would be useful in general for MCTP, but we don't have
a facility for that at present. Any existing implementation you would
suggest modelling this on?
Cheers,
Jeremy
next prev parent reply other threads:[~2024-11-14 3:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-08 9:42 [PATCH net-next] mctp i2c: notify user space on TX failure Jian Zhang
2024-11-14 3:09 ` Jakub Kicinski
2024-11-14 3:13 ` Jeremy Kerr [this message]
2024-11-14 3:19 ` Jakub Kicinski
2024-11-14 6:48 ` Jeremy Kerr
2024-11-14 15:02 ` Jakub Kicinski
2024-11-15 8:30 ` Marc Kleine-Budde
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=da9b94909dcda3f0f7e48865e63d118c3be09a8d.camel@codeconstruct.com.au \
--to=jk@codeconstruct.com.au \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=matt@codeconstruct.com.au \
--cc=netdev@vger.kernel.org \
--cc=openbmc@lists.ozlabs.org \
--cc=pabeni@redhat.com \
--cc=zhangjian.3032@bytedance.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).