From: Oliver Hartkopp <oliver@hartkopp.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Linux Netdev List <netdev@vger.kernel.org>
Subject: problem with 'net: Partially allow skb destructors to be used on receive path'
Date: Sat, 20 Jun 2009 15:17:36 +0200 [thread overview]
Message-ID: <4A3CE170.8030604@hartkopp.net> (raw)
Hello Herbert,
i got a feedback on the SocketCAN users ML from Michel Marti that the can-raw
socket option CAN_RAW_RECV_OWN_MSGS is out of order since 2.6.30.
https://lists.berlios.de/pipermail/socketcan-users/2009-June/000959.html
Usually the user application does not get CAN frames back through the socket
it was originally sent:
static void raw_rcv(struct sk_buff *skb, void *data)
{
struct sock *sk = (struct sock *)data;
struct raw_sock *ro = raw_sk(sk);
struct sockaddr_can *addr;
/* check the received tx sock reference */
if (!ro->recv_own_msgs && skb->sk == sk)
return;
...
For another detail see can_send() at net/can/af_can.c
The needed sk reference in the rx path for omitting the own received messages
is killed by a new skb_orphan() call in net/core/dev.c introduced in 2.6.30:
"net: Partially allow skb destructors to be used on receive path"
http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.30.y.git;a=commitdiff;h=9a279bcbe347496799711155ed41a89bc40f79c5
I tried to follow your comment of the commit which looks mostly associated to
IP networking.
Do you have any idea how this currently killed functionality that bases on the
originator skb->sk could be fixed?
Suggestions:
1. omit the skb_orphan() for ARPHRD_CAN skbs
2. put the sk value in cb[]
3. anything else ???
Thanks,
Oliver
next reply other threads:[~2009-06-20 13:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-20 13:17 Oliver Hartkopp [this message]
2009-06-22 12:25 ` problem with 'net: Partially allow skb destructors to be used on receive path' Herbert Xu
2009-06-22 13:44 ` Oliver Hartkopp
2009-06-22 14:56 ` Herbert Xu
2009-06-23 23:37 ` David Miller
2009-12-02 21:21 ` Oliver Hartkopp
2009-12-03 0:00 ` David Miller
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=4A3CE170.8030604@hartkopp.net \
--to=oliver@hartkopp.net \
--cc=herbert@gondor.apana.org.au \
--cc=netdev@vger.kernel.org \
/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).