Linux IEEE 802.15.4 and 6LoWPAN development
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Varka Bhadram <varkabhadram@gmail.com>
Cc: linux-wpan - ML <linux-wpan@vger.kernel.org>
Subject: Re: Unused function mac802154_header_parse()
Date: Fri, 21 Nov 2014 18:10:58 +0100	[thread overview]
Message-ID: <20141121171055.GE20364@omega> (raw)
In-Reply-To: <546F62C1.6010500@gmail.com>

On Fri, Nov 21, 2014 at 09:35:21PM +0530, Varka Bhadram wrote:
> Hi,
> 
> There are two header_ops operations defined for mac802154 at [1]. One is for creating header another for parsing.
> 
> Creation of mac802154_header_create() happening at [2] by using dev_hard_header(), but i did not find dev_parse_header()
> for header parse by mac802154_header_parse().
> 
> Am i missing anything.?
> 

For the dev_parse_header usage:

`grep -r -n "dev_parse_header" net`:

net/packet/af_packet.c:1823:	sll->sll_halen = dev_parse_header(skb, sll->sll_addr);
net/packet/af_packet.c:2030:	sll->sll_halen = dev_parse_header(skb, sll->sll_addr);

This is used by the packet layer at several places.



I need to dig more into this. It seems that these callback structure are
optional because dev_hard_header and dev_parse_header header return 0 if
they are not implemented.

Also it seems that when af_packet uses dev_hard_header header it could
be that the control block information is overwritten by packet_skb_cb.
So it's _maybe_ a bug to add additional parameters over control block
information for the header_create callback.

- Alex

  parent reply	other threads:[~2014-11-21 17:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-21 16:05 Unused function mac802154_header_parse() Varka Bhadram
2014-11-21 16:35 ` Alexander Aring
2014-11-21 17:10 ` Alexander Aring [this message]
2014-11-22  0:25   ` Varka Bhadram
2014-11-22  8:05     ` Alexander Aring

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=20141121171055.GE20364@omega \
    --to=alex.aring@gmail.com \
    --cc=linux-wpan@vger.kernel.org \
    --cc=varkabhadram@gmail.com \
    /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