netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* problem with 'net: Partially allow skb destructors to be used on receive path'
@ 2009-06-20 13:17 Oliver Hartkopp
  2009-06-22 12:25 ` Herbert Xu
  0 siblings, 1 reply; 7+ messages in thread
From: Oliver Hartkopp @ 2009-06-20 13:17 UTC (permalink / raw)
  To: Herbert Xu; +Cc: Linux Netdev List

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-12-03  0:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-20 13:17 problem with 'net: Partially allow skb destructors to be used on receive path' Oliver Hartkopp
2009-06-22 12:25 ` 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

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).