All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Linus Lüssing" <linus.luessing@c0d3.blue>
To: b.a.t.m.a.n@lists.open-mesh.org, netdev@vger.kernel.org
Subject: [B.A.T.M.A.N.] Caller or callee setting skb->network_header?
Date: Tue, 30 Jun 2015 04:01:02 +0200	[thread overview]
Message-ID: <20150630020101.GD2897@odroid> (raw)

Hi,

For an .ndo_start_xmit handler, can the callee rely on the caller
setting the skb network header?

Or should the callee set it before performing any
skb_network_header()/ip_hdr()/ipv6_hdr()/... calls?

Cheers, Linus

PS: Currently looking at batman-adv's ndo_start_xmit handler
"interface_tx()", whether an skb_set_network_header() should be
added there as it uses ip_hdr()/ipv6_hdr() later
(-> batadv_mcast_forw_mode_check_ipv{4,6}()). Testing this in
VMs it seemed to be set correctly by the caller, but wanted to
check whether this can or shouldn't be relied on.

WARNING: multiple messages have this Message-ID (diff)
From: "Linus Lüssing" <linus.luessing@c0d3.blue>
To: b.a.t.m.a.n@lists.open-mesh.org, netdev@vger.kernel.org
Subject: Caller or callee setting skb->network_header?
Date: Tue, 30 Jun 2015 04:01:02 +0200	[thread overview]
Message-ID: <20150630020101.GD2897@odroid> (raw)

Hi,

For an .ndo_start_xmit handler, can the callee rely on the caller
setting the skb network header?

Or should the callee set it before performing any
skb_network_header()/ip_hdr()/ipv6_hdr()/... calls?

Cheers, Linus

PS: Currently looking at batman-adv's ndo_start_xmit handler
"interface_tx()", whether an skb_set_network_header() should be
added there as it uses ip_hdr()/ipv6_hdr() later
(-> batadv_mcast_forw_mode_check_ipv{4,6}()). Testing this in
VMs it seemed to be set correctly by the caller, but wanted to
check whether this can or shouldn't be relied on.

             reply	other threads:[~2015-06-30  2:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-30  2:01 Linus Lüssing [this message]
2015-06-30  2:01 ` Caller or callee setting skb->network_header? Linus Lüssing

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=20150630020101.GD2897@odroid \
    --to=linus.luessing@c0d3.blue \
    --cc=b.a.t.m.a.n@lists.open-mesh.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.