/* * This file is part of the Chelsio T4 Ethernet driver for Linux. * Copyright (C) 2003-2014 Chelsio Communications. All rights reserved. * * Written by Deepak (deepak.s@chelsio.com) * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file included in this * release for licensing terms and conditions.
*/
/* Retrieves IPv6 addresses from a root device (bond, vlan) associated with * a physical device. * The physical device reference is needed to send the actul CLIP command.
*/ staticint cxgb4_update_dev_clip(struct net_device *root_dev, struct net_device *dev)
{ struct inet6_dev *idev = NULL; struct inet6_ifaddr *ifa; int ret = 0;
idev = __in6_dev_get(root_dev); if (!idev) return ret;
read_lock_bh(&idev->lock);
list_for_each_entry(ifa, &idev->addr_list, if_list) {
ret = cxgb4_clip_get(dev, (const u32 *)ifa->addr.s6_addr, 1); if (ret < 0) break;
}
read_unlock_bh(&idev->lock);
return ret;
}
int cxgb4_update_root_dev_clip(struct net_device *dev)
{ struct net_device *root_dev = NULL; int i, ret = 0;
/* First populate the real net device's IPv6 addresses */
ret = cxgb4_update_dev_clip(dev, dev); if (ret) return ret;
/* Parse all bond and vlan devices layered on top of the physical dev */
root_dev = netdev_master_upper_dev_get_rcu(dev); if (root_dev) {
ret = cxgb4_update_dev_clip(root_dev, dev); if (ret) return ret;
}
for (i = 0; i < VLAN_N_VID; i++) {
root_dev = __vlan_find_dev_deep_rcu(dev, htons(ETH_P_8021Q), i); if (!root_dev) continue;
ret = cxgb4_update_dev_clip(root_dev, dev); if (ret) break;
}
if (ctbl) {
kvfree(ctbl->cl_list);
kvfree(ctbl);
}
}
EXPORT_SYMBOL(t4_cleanup_clip_tbl);
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.15Bemerkung:
(vorverarbeitet am 2026-06-07)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.