/net/devlink/ |
D | port.c | 21 #define ASSERT_DEVLINK_PORT_REGISTERED(devlink_port) \ argument 22 WARN_ON_ONCE(!(devlink_port)->registered) 23 #define ASSERT_DEVLINK_PORT_NOT_REGISTERED(devlink_port) \ argument 24 WARN_ON_ONCE((devlink_port)->registered) 26 struct devlink_port *devlink_port_get_by_index(struct devlink *devlink, in devlink_port_get_by_index() 32 struct devlink_port *devlink_port_get_from_attrs(struct devlink *devlink, in devlink_port_get_from_attrs() 37 struct devlink_port *devlink_port; in devlink_port_get_from_attrs() local 39 devlink_port = devlink_port_get_by_index(devlink, port_index); in devlink_port_get_from_attrs() 40 if (!devlink_port) in devlink_port_get_from_attrs() 42 return devlink_port; in devlink_port_get_from_attrs() [all …]
|
D | sb.c | 449 struct devlink_port *devlink_port, in devlink_nl_sb_port_pool_fill() argument 460 err = ops->sb_port_pool_get(devlink_port, devlink_sb->index, in devlink_nl_sb_port_pool_fill() 471 if (nla_put_u32(msg, DEVLINK_ATTR_PORT_INDEX, devlink_port->index)) in devlink_nl_sb_port_pool_fill() 484 err = ops->sb_occ_port_pool_get(devlink_port, devlink_sb->index, in devlink_nl_sb_port_pool_fill() 509 struct devlink_port *devlink_port = info->user_ptr[1]; in devlink_nl_sb_port_pool_get_doit() local 510 struct devlink *devlink = devlink_port->devlink; in devlink_nl_sb_port_pool_get_doit() 532 err = devlink_nl_sb_port_pool_fill(msg, devlink, devlink_port, in devlink_nl_sb_port_pool_get_doit() 549 struct devlink_port *devlink_port; in __sb_port_pool_get_dumpit() local 555 xa_for_each(&devlink->ports, port_index, devlink_port) { in __sb_port_pool_get_dumpit() 562 devlink_port, in __sb_port_pool_get_dumpit() [all …]
|
D | rate.c | 25 struct devlink_port *devlink_port; in devlink_rate_leaf_get_from_info() local 27 devlink_port = devlink_port_get_from_attrs(devlink, info->attrs); in devlink_rate_leaf_get_from_info() 28 if (IS_ERR(devlink_port)) in devlink_rate_leaf_get_from_info() 29 return ERR_CAST(devlink_port); in devlink_rate_leaf_get_from_info() 30 devlink_rate = devlink_port->devlink_rate; in devlink_rate_leaf_get_from_info() 103 devlink_rate->devlink_port->index)) in devlink_nl_rate_fill() 631 int devl_rate_leaf_create(struct devlink_port *devlink_port, void *priv, in devl_rate_leaf_create() argument 634 struct devlink *devlink = devlink_port->devlink; in devl_rate_leaf_create() 637 devl_assert_locked(devlink_port->devlink); in devl_rate_leaf_create() 639 if (WARN_ON(devlink_port->devlink_rate)) in devl_rate_leaf_create() [all …]
|
D | netlink.c | 130 struct devlink_port *devlink_port; in __devlink_nl_pre_doit() local 140 devlink_port = devlink_port_get_from_info(devlink, info); in __devlink_nl_pre_doit() 141 if (IS_ERR(devlink_port)) { in __devlink_nl_pre_doit() 142 err = PTR_ERR(devlink_port); in __devlink_nl_pre_doit() 145 info->user_ptr[1] = devlink_port; in __devlink_nl_pre_doit() 147 devlink_port = devlink_port_get_from_info(devlink, info); in __devlink_nl_pre_doit() 148 if (!IS_ERR(devlink_port)) in __devlink_nl_pre_doit() 149 info->user_ptr[1] = devlink_port; in __devlink_nl_pre_doit()
|
D | health.c | 59 struct devlink_port *devlink_port; member 100 devlink_port_health_reporter_find_by_name(struct devlink_port *devlink_port, in devlink_port_health_reporter_find_by_name() argument 103 return __devlink_health_reporter_find_by_name(&devlink_port->reporter_list, in devlink_port_health_reporter_find_by_name() 140 devl_port_health_reporter_create(struct devlink_port *port, in devl_port_health_reporter_create() 157 reporter->devlink_port = port; in devl_port_health_reporter_create() 164 devlink_port_health_reporter_create(struct devlink_port *port, in devlink_port_health_reporter_create() 275 if (reporter->devlink_port) { in devlink_nl_health_reporter_fill() 276 if (nla_put_u32(msg, DEVLINK_ATTR_PORT_INDEX, reporter->devlink_port->index)) in devlink_nl_health_reporter_fill() 333 struct devlink_port *devlink_port; in devlink_health_reporter_get_from_attrs() local 340 devlink_port = devlink_port_get_from_attrs(devlink, attrs); in devlink_health_reporter_get_from_attrs() [all …]
|
D | devl_internal.h | 171 #define ASSERT_DEVLINK_PORT_INITIALIZED(devlink_port) \ argument 172 WARN_ON_ONCE(!(devlink_port)->initialized) 174 struct devlink_port *devlink_port_get_by_index(struct devlink *devlink, 178 struct devlink_port * 180 struct devlink_port *devlink_port_get_from_attrs(struct devlink *devlink,
|
D | region.c | 11 struct devlink_port *port; 47 devlink_port_region_get_by_name(struct devlink_port *port, in devlink_port_region_get_by_name() 475 struct devlink_port *port = NULL; in devlink_nl_region_get_doit() 519 struct devlink_port *port, in devlink_nl_cmd_region_get_port_dumpit() 551 struct devlink_port *port; in devlink_nl_region_get_dump_one() 595 struct devlink_port *port = NULL; in devlink_nl_cmd_region_del() 640 struct devlink_port *port = NULL; in devlink_nl_cmd_region_new() 874 struct devlink_port *port = NULL; in devlink_nl_cmd_region_read_dumpit() 1113 devlink_port_region_create(struct devlink_port *port, in devlink_port_region_create()
|
D | trap.c | 1470 struct devlink_port *in_devlink_port, in devlink_trap_report_metadata_set() 1493 void *trap_ctx, struct devlink_port *in_devlink_port, in devlink_trap_report()
|
/net/dsa/ |
D | devlink.c | 50 static int dsa_devlink_sb_port_pool_get(struct devlink_port *dlp, in dsa_devlink_sb_port_pool_get() 64 static int dsa_devlink_sb_port_pool_set(struct devlink_port *dlp, in dsa_devlink_sb_port_pool_set() 80 dsa_devlink_sb_tc_pool_bind_get(struct devlink_port *dlp, in dsa_devlink_sb_tc_pool_bind_get() 97 dsa_devlink_sb_tc_pool_bind_set(struct devlink_port *dlp, in dsa_devlink_sb_tc_pool_bind_set() 137 static int dsa_devlink_sb_occ_port_pool_get(struct devlink_port *dlp, in dsa_devlink_sb_occ_port_pool_get() 153 dsa_devlink_sb_occ_tc_port_bind_get(struct devlink_port *dlp, in dsa_devlink_sb_occ_tc_port_bind_get() 279 return devlink_port_region_create(&dp->devlink_port, ops, in dsa_devlink_port_region_create() 293 struct devlink_port *dlp = &dp->devlink_port; in dsa_port_devlink_setup() 346 struct devlink_port *dlp = &dp->devlink_port; in dsa_port_devlink_teardown()
|
D | slave.c | 2639 SET_NETDEV_DEVLINK_PORT(slave_dev, &port->devlink_port); in dsa_slave_create()
|
/net/core/ |
D | net-sysfs.c | 534 !netdev->devlink_port) in phys_port_name_show() 564 !netdev->devlink_port) in phys_switch_id_show()
|
D | rtnetlink.c | 1052 if (dev->devlink_port) in rtnl_devlink_port_size() 1053 size += devlink_nl_port_handle_size(dev->devlink_port); in rtnl_devlink_port_size() 1763 if (dev->devlink_port) { in rtnl_fill_devlink_port() 1764 ret = devlink_nl_port_handle_fill(skb, dev->devlink_port); in rtnl_fill_devlink_port()
|
/net/ethtool/ |
D | ioctl.c | 48 if (!dev->devlink_port) in netdev_to_devlink_get() 50 return devlink_try_get(dev->devlink_port->devlink); in netdev_to_devlink_get()
|