When a struct switchdev_attr is notified through switchdev, there is no way to report informational messages, unlike for struct switchdev_obj.
Showing the changes to net/switchdev/switchdev.c (1 of 8 files). Show all
Unified · Split
| @@ -488,14 +488,18 @@ static int __switchdev_handle_port_attr_set(struct net_device *dev, · 487 unmodified lines | ||
| 488 | 488 | struct switchdev_notifier_port_attr_info *port_attr_info, |
| 489 | 489 | bool (*check_cb)(const struct net_device *dev), |
| 490 | 490 | int (*set_cb)(struct net_device *dev, |
| 491 | − const struct switchdev_attr *attr)) | |
| 491 | + const struct switchdev_attr *attr, | |
| 492 | + struct netlink_ext_ack *extack)) | |
| 492 | 493 | { |
| 494 | + struct netlink_ext_ack *extack; | |
| 493 | 495 | struct net_device *lower_dev; |
| 494 | 496 | struct list_head *iter; |
| 495 | 497 | int err = -EOPNOTSUPP; |
| 496 | 498 | |
| 499 | + extack = switchdev_notifier_info_to_extack(&port_attr_info->info); | |
| 500 | + | |
| 497 | 501 | if (check_cb(dev)) { |
| 498 | − err = set_cb(dev, port_attr_info->attr); | |
| 502 | + err = set_cb(dev, port_attr_info->attr, extack); | |
| 499 | 503 | if (err != -EOPNOTSUPP) |
| 500 | 504 | port_attr_info->handled = true; |
| 501 | 505 | return err; |
| @@ -525,7 +529,8 @@ int switchdev_handle_port_attr_set(struct net_device *dev, · 23 unmodified lines | ||
| 525 | 529 | struct switchdev_notifier_port_attr_info *port_attr_info, |
| 526 | 530 | bool (*check_cb)(const struct net_device *dev), |
| 527 | 531 | int (*set_cb)(struct net_device *dev, |
| 528 | − const struct switchdev_attr *attr)) | |
| 532 | + const struct switchdev_attr *attr, | |
| 533 | + struct netlink_ext_ack *extack)) | |
| 529 | 534 | { |
| 530 | 535 | int err; |
| 531 | 536 | |