• Home
  • Raw
  • Download

Lines Matching refs:devlink

26 struct devlink_port *devlink_port_get_by_index(struct devlink *devlink,  in devlink_port_get_by_index()  argument
29 return xa_load(&devlink->ports, port_index); in devlink_port_get_by_index()
32 struct devlink_port *devlink_port_get_from_attrs(struct devlink *devlink, in devlink_port_get_from_attrs() argument
39 devlink_port = devlink_port_get_by_index(devlink, port_index); in devlink_port_get_from_attrs()
47 struct devlink_port *devlink_port_get_from_info(struct devlink *devlink, in devlink_port_get_from_info() argument
50 return devlink_port_get_from_attrs(devlink, info->attrs); in devlink_port_get_from_info()
187 if (devlink_nl_put_handle(msg, devlink_port->devlink)) in devlink_nl_port_handle_fill()
196 struct devlink *devlink = devlink_port->devlink; in devlink_nl_port_handle_size() local
198 return nla_total_size(strlen(devlink->dev->bus->name) + 1) /* DEVLINK_ATTR_BUS_NAME */ in devlink_nl_port_handle_size()
199 + nla_total_size(strlen(dev_name(devlink->dev)) + 1) /* DEVLINK_ATTR_DEV_NAME */ in devlink_nl_port_handle_size()
444 struct devlink *devlink = devlink_port->devlink; in devlink_nl_port_fill() local
451 if (devlink_nl_put_handle(msg, devlink)) in devlink_nl_port_fill()
502 struct devlink *devlink = devlink_port->devlink; in devlink_port_notify() local
508 if (!xa_get_mark(&devlinks, devlink->index, DEVLINK_REGISTERED)) in devlink_port_notify()
521 genlmsg_multicast_netns(&devlink_nl_family, devlink_net(devlink), msg, in devlink_port_notify()
525 static void devlink_ports_notify(struct devlink *devlink, in devlink_ports_notify() argument
531 xa_for_each(&devlink->ports, port_index, devlink_port) in devlink_ports_notify()
535 void devlink_ports_notify_register(struct devlink *devlink) in devlink_ports_notify_register() argument
537 devlink_ports_notify(devlink, DEVLINK_CMD_PORT_NEW); in devlink_ports_notify_register()
540 void devlink_ports_notify_unregister(struct devlink *devlink) in devlink_ports_notify_unregister() argument
542 devlink_ports_notify(devlink, DEVLINK_CMD_PORT_DEL); in devlink_ports_notify_unregister()
567 devlink_nl_port_get_dump_one(struct sk_buff *msg, struct devlink *devlink, in devlink_nl_port_get_dump_one() argument
575 xa_for_each_start(&devlink->ports, port_index, devlink_port, state->idx) { in devlink_nl_port_get_dump_one()
797 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_cmd_port_split_doit() local
821 return devlink_port->ops->port_split(devlink, devlink_port, count, in devlink_nl_cmd_port_split_doit()
829 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_cmd_port_unsplit_doit() local
833 return devlink_port->ops->port_unsplit(devlink, devlink_port, info->extack); in devlink_nl_cmd_port_unsplit_doit()
840 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_cmd_port_new_doit() local
845 if (!devlink->ops->port_new) in devlink_nl_cmd_port_new_doit()
874 err = devlink->ops->port_new(devlink, &new_attrs, in devlink_nl_cmd_port_new_doit()
896 devlink_port->ops->port_del(devlink, devlink_port, NULL); in devlink_nl_cmd_port_new_doit()
904 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_cmd_port_del_doit() local
909 return devlink_port->ops->port_del(devlink, devlink_port, extack); in devlink_nl_cmd_port_del_doit()
917 dev_warn(port->devlink->dev, "Type was not set for devlink port."); in devlink_port_type_warn()
959 void devlink_port_init(struct devlink *devlink, in devlink_port_init() argument
964 devlink_port->devlink = devlink; in devlink_port_init()
1002 int devl_port_register_with_ops(struct devlink *devlink, in devl_port_register_with_ops() argument
1009 devl_assert_locked(devlink); in devl_port_register_with_ops()
1013 devlink_port_init(devlink, devlink_port); in devl_port_register_with_ops()
1019 err = xa_insert(&devlink->ports, port_index, devlink_port, GFP_KERNEL); in devl_port_register_with_ops()
1048 int devlink_port_register_with_ops(struct devlink *devlink, in devlink_port_register_with_ops() argument
1055 devl_lock(devlink); in devlink_port_register_with_ops()
1056 err = devl_port_register_with_ops(devlink, devlink_port, in devlink_port_register_with_ops()
1058 devl_unlock(devlink); in devlink_port_register_with_ops()
1070 lockdep_assert_held(&devlink_port->devlink->lock); in devl_port_unregister()
1075 xa_erase(&devlink_port->devlink->ports, devlink_port->index); in devl_port_unregister()
1090 struct devlink *devlink = devlink_port->devlink; in devlink_port_unregister() local
1092 devl_lock(devlink); in devlink_port_unregister()
1094 devl_unlock(devlink); in devlink_port_unregister()
1183 dev_warn(devlink_port->devlink->dev, in devlink_port_type_eth_set()
1214 dev_warn(devlink_port->devlink->dev, in devlink_port_type_clear()
1226 struct devlink *devlink; in devlink_port_netdevice_event() local
1230 devlink = devlink_port->devlink; in devlink_port_netdevice_event()
1243 if (devlink_net(devlink) != dev_net(netdev)) in devlink_port_netdevice_event()
1254 if (devlink_net(devlink) != dev_net(netdev)) in devlink_port_netdevice_event()