[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <da9b94909dcda3f0f7e48865e63d118c3be09a8d.camel@codeconstruct.com.au>
Date: Thu, 14 Nov 2024 11:13:33 +0800
From: Jeremy Kerr <jk@...econstruct.com.au>
To: Jakub Kicinski <kuba@...nel.org>, Jian Zhang
<zhangjian.3032@...edance.com>
Cc: netdev@...r.kernel.org, openbmc@...ts.ozlabs.org, Matt Johnston
<matt@...econstruct.com.au>, "David S. Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, open list
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] mctp i2c: notify user space on TX failure
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
Powered by blists - more mailing lists