History

net: Get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID

Now that we have a dedicated NDO for getting a port's parent ID, get rid of SWITCHDEV_ATTR_ID_PORT_PARENT_ID and convert all callers to use the NDO exclusively. This is a preliminary change to getting rid of switchdev_ops eventually.

Florian Fainelli committed 7 years ago

Commit bccb3021 parent 929d6c16 files · +15 −84Browse files

Showing the changes to net/switchdev/switchdev.c (1 of 6 files). Show all

Unified · Split

net/switchdev/switchdev.c+0−20
@@ -592,26 +592,6 @@ int call_switchdev_blocking_notifiers(unsigned long val, struct net_device *dev, · 591 unmodified lines
592}592}
593EXPORT_SYMBOL_GPL(call_switchdev_blocking_notifiers);593EXPORT_SYMBOL_GPL(call_switchdev_blocking_notifiers);
594 594
595bool switchdev_port_same_parent_id(struct net_device *a,
596 struct net_device *b)
597{
598 struct switchdev_attr a_attr = {
599 .orig_dev = a,
600 .id = SWITCHDEV_ATTR_ID_PORT_PARENT_ID,
601 };
602 struct switchdev_attr b_attr = {
603 .orig_dev = b,
604 .id = SWITCHDEV_ATTR_ID_PORT_PARENT_ID,
605 };
606
607 if (switchdev_port_attr_get(a, &a_attr) ||
608 switchdev_port_attr_get(b, &b_attr))
609 return false;
610
611 return netdev_phys_item_id_same(&a_attr.u.ppid, &b_attr.u.ppid);
612}
613EXPORT_SYMBOL_GPL(switchdev_port_same_parent_id);
614
615static int __switchdev_handle_port_obj_add(struct net_device *dev,595static int __switchdev_handle_port_obj_add(struct net_device *dev,
616 struct switchdev_notifier_port_obj_info *port_obj_info,596 struct switchdev_notifier_port_obj_info *port_obj_info,
617 bool (*check_cb)(const struct net_device *dev),597 bool (*check_cb)(const struct net_device *dev),

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t