On 3/25/2012 6:09 AM, Roopa Prabhu wrote:
>
>
>
> On 3/18/12 11:52 PM, "John Fastabend" <[email protected]> wrote:
>
>> This adds a generic dump routine drivers can call. It
>> should be sufficient to handle any bridging model that
>> uses the unicast address list. This should be most SR-IOV
>> enabled NICs.
>>
>> Signed-off-by: John Fastabend <[email protected]>
>> ---
>>
[...]
>> +/**
>> + * ndo_dflt_fdb_dump: default netdevice operation to dump an FDB table.
>> + * @nlh: netlink message header
>> + * @dev: netdevice
>> + *
>> + * Default netdevice operation to dump the existing unicast address list.
>> + * Returns zero on success.
>> + */
>> +int ndo_dflt_fdb_dump(struct sk_buff *skb,
>> + struct netlink_callback *cb,
>> + struct net_device *dev,
>> + int idx)
>> +{
>> + struct netdev_hw_addr *ha;
>> + struct nlmsghdr *nlh;
>> + struct ndmsg *ndm;
>> + u32 pid, seq;
>> +
>> + pid = NETLINK_CB(cb->skb).pid;
>> + seq = cb->nlh->nlmsg_seq;
>> +
>> + netif_addr_lock_bh(dev);
>> + list_for_each_entry(ha, &dev->uc.list, list) {
>> + if (idx < cb->args[0])
>> + goto skip;
>
> Any reason why its only uc ?. What about mc ?
Sure this might be useful to know for embedded devices
and likely more useful for the macvlan driver. I'll add
it in the next version.
Thanks,
John
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html