All of lore.kernel.org
 help / color / mirror / Atom feed
From: Varka Bhadram <varkabhadram@gmail.com>
To: Alexander Aring <alex.aring@gmail.com>
Cc: linux-wpan - ML <linux-wpan@vger.kernel.org>
Subject: Re: Unused function mac802154_header_parse()
Date: Sat, 22 Nov 2014 05:55:25 +0530	[thread overview]
Message-ID: <546FD7F5.1060901@gmail.com> (raw)
In-Reply-To: <20141121171055.GE20364@omega>

On Friday 21 November 2014 10:40 PM, Alexander Aring wrote:
> 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.

My point is that no where mac802154_header_parse() function is called.

This has to be called by dev_parse header().

-- 
Thanks and Regards,
Varka Bhadram.


  reply	other threads:[~2014-11-22  0:25 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
2014-11-22  0:25   ` Varka Bhadram [this message]
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=546FD7F5.1060901@gmail.com \
    --to=varkabhadram@gmail.com \
    --cc=alex.aring@gmail.com \
    --cc=linux-wpan@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.