* dev_loopback_xmit parameters
@ 2018-04-23 21:40 Emanuele
2018-04-23 22:36 ` Eric Dumazet
0 siblings, 1 reply; 3+ messages in thread
From: Emanuele @ 2018-04-23 21:40 UTC (permalink / raw)
To: Linux Kernel Network Developers
Hello,
I don't know if this is the right place where to ask, but I was
wondering why the dev_loopback_xmit function defined in /net/core/dev.c
takes struct net * and struct sock * as parameters. They are never
used, so I believe passing only the struct sk_buff * should be enough.
In addition, it would like to know where I can read what is and how to
set a skb dst_entry, since I don't really understand it.
Thanks a lot,
Emanuele
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: dev_loopback_xmit parameters
2018-04-23 21:40 dev_loopback_xmit parameters Emanuele
@ 2018-04-23 22:36 ` Eric Dumazet
2018-04-23 23:11 ` Emanuele
0 siblings, 1 reply; 3+ messages in thread
From: Eric Dumazet @ 2018-04-23 22:36 UTC (permalink / raw)
To: Emanuele, Linux Kernel Network Developers
On 04/23/2018 02:40 PM, Emanuele wrote:
> Hello,
>
> I don't know if this is the right place where to ask, but I was wondering why the dev_loopback_xmit function defined in /net/core/dev.c takes struct net * and struct sock * as parameters. They are never used, so I believe passing only the struct sk_buff * should be enough.
>
Look at net/ipv6/ip6_output.c where NF_HOOK() uses dev_loopback_xmit().
> In addition, it would like to know where I can read what is and how to set a skb dst_entry, since I don't really understand it.
>
> Thanks a lot,
>
> Emanuele
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: dev_loopback_xmit parameters
2018-04-23 22:36 ` Eric Dumazet
@ 2018-04-23 23:11 ` Emanuele
0 siblings, 0 replies; 3+ messages in thread
From: Emanuele @ 2018-04-23 23:11 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Linux Kernel Network Developers
Ok, clear now.
Even though I don't understand what to set to avoid triggering the
WARN_ON(!skb_dst(skb));
inside dev_loopback_xmit.
I just would like to send the skb in loopback, i.e. moving the packet
from the sending to the receiving queue of a certain struct net_device.
On 24/04/2018 00:36, Eric Dumazet wrote:
>
> On 04/23/2018 02:40 PM, Emanuele wrote:
>> Hello,
>>
>> I don't know if this is the right place where to ask, but I was wondering why the dev_loopback_xmit function defined in /net/core/dev.c takes struct net * and struct sock * as parameters. They are never used, so I believe passing only the struct sk_buff * should be enough.
>>
> Look at net/ipv6/ip6_output.c where NF_HOOK() uses dev_loopback_xmit().
>
>> In addition, it would like to know where I can read what is and how to set a skb dst_entry, since I don't really understand it.
>>
>> Thanks a lot,
>>
>> Emanuele
>>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-04-23 23:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-23 21:40 dev_loopback_xmit parameters Emanuele
2018-04-23 22:36 ` Eric Dumazet
2018-04-23 23:11 ` Emanuele
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox