Lines Matching refs:devlink
11 struct devlink *devlink; member
29 devlink_linecard_get_by_index(struct devlink *devlink, in devlink_linecard_get_by_index() argument
34 list_for_each_entry(devlink_linecard, &devlink->linecard_list, list) { in devlink_linecard_get_by_index()
41 static bool devlink_linecard_index_exists(struct devlink *devlink, in devlink_linecard_index_exists() argument
44 return devlink_linecard_get_by_index(devlink, linecard_index); in devlink_linecard_index_exists()
48 devlink_linecard_get_from_attrs(struct devlink *devlink, struct nlattr **attrs) in devlink_linecard_get_from_attrs() argument
54 linecard = devlink_linecard_get_by_index(devlink, linecard_index); in devlink_linecard_get_from_attrs()
63 devlink_linecard_get_from_info(struct devlink *devlink, struct genl_info *info) in devlink_linecard_get_from_info() argument
65 return devlink_linecard_get_from_attrs(devlink, info->attrs); in devlink_linecard_get_from_info()
74 struct devlink *devlink, in devlink_nl_linecard_fill() argument
89 if (devlink_nl_put_handle(msg, devlink)) in devlink_nl_linecard_fill()
115 if (devlink_rel_devlink_handle_put(msg, devlink, in devlink_nl_linecard_fill()
132 struct devlink *devlink = linecard->devlink; in devlink_linecard_notify() local
139 if (!__devl_is_registered(devlink) || !devlink_nl_notify_need(devlink)) in devlink_linecard_notify()
146 err = devlink_nl_linecard_fill(msg, devlink, linecard, cmd, 0, 0, 0, in devlink_linecard_notify()
153 devlink_nl_notify_send(devlink, msg); in devlink_linecard_notify()
156 void devlink_linecards_notify_register(struct devlink *devlink) in devlink_linecards_notify_register() argument
160 list_for_each_entry(linecard, &devlink->linecard_list, list) in devlink_linecards_notify_register()
164 void devlink_linecards_notify_unregister(struct devlink *devlink) in devlink_linecards_notify_unregister() argument
168 list_for_each_entry_reverse(linecard, &devlink->linecard_list, list) in devlink_linecards_notify_unregister()
174 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_linecard_get_doit() local
179 linecard = devlink_linecard_get_from_info(devlink, info); in devlink_nl_linecard_get_doit()
188 err = devlink_nl_linecard_fill(msg, devlink, linecard, in devlink_nl_linecard_get_doit()
202 struct devlink *devlink, in devlink_nl_linecard_get_dump_one() argument
211 list_for_each_entry(linecard, &devlink->linecard_list, list) { in devlink_nl_linecard_get_dump_one()
217 err = devlink_nl_linecard_fill(msg, devlink, linecard, in devlink_nl_linecard_get_dump_one()
374 struct devlink *devlink = info->user_ptr[0]; in devlink_nl_linecard_set_doit() local
378 linecard = devlink_linecard_get_from_info(devlink, info); in devlink_nl_linecard_set_doit()
441 devl_linecard_create(struct devlink *devlink, unsigned int linecard_index, in devl_linecard_create() argument
451 if (devlink_linecard_index_exists(devlink, linecard_index)) in devl_linecard_create()
458 linecard->devlink = devlink; in devl_linecard_create()
472 list_add_tail(&linecard->list, &devlink->linecard_list); in devl_linecard_create()
590 static void devlink_linecard_rel_notify_cb(struct devlink *devlink, in devlink_linecard_rel_notify_cb() argument
595 linecard = devlink_linecard_get_by_index(devlink, linecard_index); in devlink_linecard_rel_notify_cb()
601 static void devlink_linecard_rel_cleanup_cb(struct devlink *devlink, in devlink_linecard_rel_cleanup_cb() argument
606 linecard = devlink_linecard_get_by_index(devlink, linecard_index); in devlink_linecard_rel_cleanup_cb()
619 struct devlink *nested_devlink) in devlink_linecard_nested_dl_set()
622 linecard->devlink->index, in devlink_linecard_nested_dl_set()