From: David Daney <ddaney@caviumnetworks•com>
To: Jiri Pirko <jpirko@redhat•com>
Cc: davem@davemloft•net, netdev@vger•kernel.org
Subject: Re: octeon dev_addrs list usage
Date: Wed, 24 Feb 2010 10:10:15 -0800 [thread overview]
Message-ID: <4B856B87.9030507@caviumnetworks.com> (raw)
In-Reply-To: <20100223204151.GG2673@psychotron.redhat.com>
On 02/23/2010 12:41 PM, Jiri Pirko wrote:
> Hello David.
>
> Lookin at octeon driver, drivers/net/octeon/octeon_mgmt.c,
> octeon_mgmt_set_rx_filtering function and following code:
>
> 503 if (cam_mode == 1) {
> 504 /* Add primary address. */
> 505 octeon_mgmt_cam_state_add(&cam_state, netdev->dev_addr);
> 506 list_for_each(pos,&netdev->dev_addrs.list) {
> 507 struct netdev_hw_addr *hw_addr;
> 508 hw_addr = list_entry(pos, struct netdev_hw_addr, list);
> 509 octeon_mgmt_cam_state_add(&cam_state, hw_addr->addr);
> 510 list = list->next;
> 511 }
> 512 }
>
> besides netdev->dev_addr is first entry in netdev->dev_addrs.list and
Ok.
> "list = list->next;" makes no sense here (I posted a patch correcting
> these earlier),
Right, that does look wrong.
> are you sure you are traversing the right list? This list is
> currently not filled in anywhere (besides ixgbe driver). Don't you want
> to traverse through unicast_list instead? Maybe I'm missing something...
>
You are likely right. I will revisit this code, but it could be a couple
of days.
Thanks for looking at it,
David Daney
prev parent reply other threads:[~2010-02-24 18:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-23 20:41 octeon dev_addrs list usage Jiri Pirko
2010-02-24 18:10 ` David Daney [this message]
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=4B856B87.9030507@caviumnetworks.com \
--to=ddaney@caviumnetworks$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=jpirko@redhat$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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