All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ding Tianhong <dingtianhong@huawei.com>
To: Veaceslav Falico <vfalico@redhat.com>
Cc: <netdev@vger.kernel.org>, "David S. Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	Nicolas Dichtel <nicolas.dichtel@6wind.com>,
	Cong Wang <amwang@redhat.com>
Subject: Re: [PATCH v2 net-next 2/2] net: rename sysfs symlinks on device name change
Date: Wed, 15 Jan 2014 11:09:53 +0800	[thread overview]
Message-ID: <52D5FC01.2060707@huawei.com> (raw)
In-Reply-To: <20140115025900.GB1554@redhat.com>

On 2014/1/15 10:59, Veaceslav Falico wrote:
> On Wed, Jan 15, 2014 at 10:50:30AM +0800, Ding Tianhong wrote:
>> On 2014/1/15 4:58, Veaceslav Falico wrote:
> ...snip...
>>> +void netdev_adjacent_rename_links(struct net_device *dev, char *oldname)
>>> +{
>>> +    struct netdev_adjacent *iter;
>>> +
>>> +    list_for_each_entry(iter, &dev->adj_list.upper, list) {
>>> +        netdev_adjacent_sysfs_del(iter->dev, oldname,
>>> +                      &iter->dev->adj_list.lower);
>>> +        netdev_adjacent_sysfs_add(iter->dev, dev,
>>> +                      &iter->dev->adj_list.lower);
>>> +    }
>>> +
>>> +    list_for_each_entry(iter, &dev->adj_list.lower, list) {
>>> +        netdev_adjacent_sysfs_del(iter->dev, oldname,
>>> +                      &iter->dev->adj_list.upper);
>>> +        netdev_adjacent_sysfs_add(iter->dev, dev,
>>> +                      &iter->dev->adj_list.upper);
>>> +    }
>>> +}
>>> +
>>
>> why no all_adj_list, only adj_list?
>>
>> I think you have add the dev to the upper_dev's upper_dev by all_adj_list, and lower_dev, so you have to check them.
> 
> symlinks are created only for neighbour adjacent devices, which are in
> adj_list.*, and are not created for all_adj_list.* devices, which contains
> a 'full view' list of all adjacent devices.
> 

Yes, it return when found adj, I miss it.

>>
>> Regards
>> Ding
>>
>>>  void *netdev_lower_dev_get_private(struct net_device *dev,
>>>                     struct net_device *lower_dev)
>>>  {
>>>
>>
>>
> 
> 

  reply	other threads:[~2014-01-15  3:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-14 20:58 [PATCH v2 net-next 0/2] net: rename device's sysfs symlinks on name change Veaceslav Falico
2014-01-14 20:58 ` [PATCH v2 net-next 1/2] net: add sysfs helpers for netdev_adjacent logic Veaceslav Falico
2014-01-14 20:58 ` [PATCH v2 net-next 2/2] net: rename sysfs symlinks on device name change Veaceslav Falico
2014-01-15  2:50   ` Ding Tianhong
2014-01-15  2:59     ` Veaceslav Falico
2014-01-15  3:09       ` Ding Tianhong [this message]
2014-01-15 23:17 ` [PATCH v2 net-next 0/2] net: rename device's sysfs symlinks on " David Miller

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=52D5FC01.2060707@huawei.com \
    --to=dingtianhong@huawei.com \
    --cc=amwang@redhat.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=vfalico@redhat.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 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.