• Home
  • Raw
  • Download

Lines Matching refs:ops

278 	const struct rtnl_link_ops *ops;  in rtnl_link_ops_get()  local
280 list_for_each_entry(ops, &link_ops, list) { in rtnl_link_ops_get()
281 if (!strcmp(ops->kind, kind)) in rtnl_link_ops_get()
282 return ops; in rtnl_link_ops_get()
297 int __rtnl_link_register(struct rtnl_link_ops *ops) in __rtnl_link_register() argument
299 if (rtnl_link_ops_get(ops->kind)) in __rtnl_link_register()
307 if (ops->setup && !ops->dellink) in __rtnl_link_register()
308 ops->dellink = unregister_netdevice_queue; in __rtnl_link_register()
310 list_add_tail(&ops->list, &link_ops); in __rtnl_link_register()
321 int rtnl_link_register(struct rtnl_link_ops *ops) in rtnl_link_register() argument
326 err = __rtnl_link_register(ops); in rtnl_link_register()
332 static void __rtnl_kill_links(struct net *net, struct rtnl_link_ops *ops) in __rtnl_kill_links() argument
338 if (dev->rtnl_link_ops == ops) in __rtnl_kill_links()
339 ops->dellink(dev, &list_kill); in __rtnl_kill_links()
350 void __rtnl_link_unregister(struct rtnl_link_ops *ops) in __rtnl_link_unregister() argument
355 __rtnl_kill_links(net, ops); in __rtnl_link_unregister()
357 list_del(&ops->list); in __rtnl_link_unregister()
393 void rtnl_link_unregister(struct rtnl_link_ops *ops) in rtnl_link_unregister() argument
398 __rtnl_link_unregister(ops); in rtnl_link_unregister()
407 const struct rtnl_link_ops *ops; in rtnl_link_get_slave_info_data_size() local
412 ops = master_dev->rtnl_link_ops; in rtnl_link_get_slave_info_data_size()
413 if (!ops || !ops->get_slave_size) in rtnl_link_get_slave_info_data_size()
417 ops->get_slave_size(master_dev, dev); in rtnl_link_get_slave_info_data_size()
422 const struct rtnl_link_ops *ops = dev->rtnl_link_ops; in rtnl_link_get_size() local
425 if (!ops) in rtnl_link_get_size()
429 nla_total_size(strlen(ops->kind) + 1); /* IFLA_INFO_KIND */ in rtnl_link_get_size()
431 if (ops->get_size) in rtnl_link_get_size()
434 ops->get_size(dev); in rtnl_link_get_size()
436 if (ops->get_xstats_size) in rtnl_link_get_size()
438 size += nla_total_size(ops->get_xstats_size(dev)); in rtnl_link_get_size()
449 const struct rtnl_af_ops *ops; in rtnl_af_lookup() local
451 list_for_each_entry(ops, &rtnl_af_ops, list) { in rtnl_af_lookup()
452 if (ops->family == family) in rtnl_af_lookup()
453 return ops; in rtnl_af_lookup()
465 void rtnl_af_register(struct rtnl_af_ops *ops) in rtnl_af_register() argument
468 list_add_tail(&ops->list, &rtnl_af_ops); in rtnl_af_register()
479 void __rtnl_af_unregister(struct rtnl_af_ops *ops) in __rtnl_af_unregister() argument
481 list_del(&ops->list); in __rtnl_af_unregister()
489 void rtnl_af_unregister(struct rtnl_af_ops *ops) in rtnl_af_unregister() argument
492 __rtnl_af_unregister(ops); in rtnl_af_unregister()
530 const struct rtnl_link_ops *ops; in rtnl_link_slave_info_fill() local
537 ops = master_dev->rtnl_link_ops; in rtnl_link_slave_info_fill()
538 if (!ops) in rtnl_link_slave_info_fill()
540 if (nla_put_string(skb, IFLA_INFO_SLAVE_KIND, ops->kind) < 0) in rtnl_link_slave_info_fill()
542 if (ops->fill_slave_info) { in rtnl_link_slave_info_fill()
546 err = ops->fill_slave_info(skb, master_dev, dev); in rtnl_link_slave_info_fill()
561 const struct rtnl_link_ops *ops = dev->rtnl_link_ops; in rtnl_link_info_fill() local
565 if (!ops) in rtnl_link_info_fill()
567 if (nla_put_string(skb, IFLA_INFO_KIND, ops->kind) < 0) in rtnl_link_info_fill()
569 if (ops->fill_xstats) { in rtnl_link_info_fill()
570 err = ops->fill_xstats(skb, dev); in rtnl_link_info_fill()
574 if (ops->fill_info) { in rtnl_link_info_fill()
578 err = ops->fill_info(skb, dev); in rtnl_link_info_fill()
1014 nla_put_string(skb, IFLA_QDISC, dev->qdisc->ops->id)) || in rtnl_fill_ifinfo()
1368 const struct net_device_ops *ops = dev->netdev_ops; in do_setvfinfo() local
1375 if (ops->ndo_set_vf_mac) in do_setvfinfo()
1376 err = ops->ndo_set_vf_mac(dev, ivm->vf, in do_setvfinfo()
1386 if (ops->ndo_set_vf_vlan) in do_setvfinfo()
1387 err = ops->ndo_set_vf_vlan(dev, ivv->vf, ivv->vlan, in do_setvfinfo()
1398 if (ops->ndo_get_vf_config) in do_setvfinfo()
1399 err = ops->ndo_get_vf_config(dev, ivt->vf, &ivf); in do_setvfinfo()
1404 if (ops->ndo_set_vf_rate) in do_setvfinfo()
1405 err = ops->ndo_set_vf_rate(dev, ivt->vf, in do_setvfinfo()
1416 if (ops->ndo_set_vf_rate) in do_setvfinfo()
1417 err = ops->ndo_set_vf_rate(dev, ivt->vf, in do_setvfinfo()
1428 if (ops->ndo_set_vf_spoofchk) in do_setvfinfo()
1429 err = ops->ndo_set_vf_spoofchk(dev, ivs->vf, in do_setvfinfo()
1439 if (ops->ndo_set_vf_link_state) in do_setvfinfo()
1440 err = ops->ndo_set_vf_link_state(dev, ivl->vf, in do_setvfinfo()
1451 if (ops->ndo_set_vf_rss_query_en) in do_setvfinfo()
1452 err = ops->ndo_set_vf_rss_query_en(dev, ivrssq_en->vf, in do_setvfinfo()
1464 const struct net_device_ops *ops; in do_set_master() local
1470 ops = upper_dev->netdev_ops; in do_set_master()
1471 if (ops->ndo_del_slave) { in do_set_master()
1472 err = ops->ndo_del_slave(upper_dev, dev); in do_set_master()
1484 ops = upper_dev->netdev_ops; in do_set_master()
1485 if (ops->ndo_add_slave) { in do_set_master()
1486 err = ops->ndo_add_slave(upper_dev, dev); in do_set_master()
1503 const struct net_device_ops *ops = dev->netdev_ops; in do_setlink() local
1528 if (!ops->ndo_set_config) { in do_setlink()
1546 err = ops->ndo_set_config(dev, &k_map); in do_setlink()
1683 if (!ops->ndo_set_vf_port) in do_setlink()
1698 err = ops->ndo_set_vf_port(dev, vf, port); in do_setlink()
1715 if (ops->ndo_set_vf_port) in do_setlink()
1716 err = ops->ndo_set_vf_port(dev, PORT_SELF_VF, port); in do_setlink()
1798 const struct rtnl_link_ops *ops; in rtnl_dellink() local
1824 ops = dev->rtnl_link_ops; in rtnl_dellink()
1825 if (!ops || !ops->dellink) in rtnl_dellink()
1828 ops->dellink(dev, &list_kill); in rtnl_dellink()
1854 const struct rtnl_link_ops *ops, struct nlattr *tb[]) in rtnl_create_link() argument
1863 else if (ops->get_num_tx_queues) in rtnl_create_link()
1864 num_tx_queues = ops->get_num_tx_queues(); in rtnl_create_link()
1868 else if (ops->get_num_rx_queues) in rtnl_create_link()
1869 num_rx_queues = ops->get_num_rx_queues(); in rtnl_create_link()
1872 dev = alloc_netdev_mqs(ops->priv_size, ifname, name_assign_type, in rtnl_create_link()
1873 ops->setup, num_tx_queues, num_rx_queues); in rtnl_create_link()
1878 dev->rtnl_link_ops = ops; in rtnl_create_link()
1929 const struct rtnl_link_ops *ops; in rtnl_newlink() local
1983 ops = rtnl_link_ops_get(kind); in rtnl_newlink()
1986 ops = NULL; in rtnl_newlink()
1990 struct nlattr *attr[ops ? ops->maxtype + 1 : 0]; in rtnl_newlink()
1996 if (ops) { in rtnl_newlink()
1997 if (ops->maxtype && linkinfo[IFLA_INFO_DATA]) { in rtnl_newlink()
1998 err = nla_parse_nested(attr, ops->maxtype, in rtnl_newlink()
2000 ops->policy); in rtnl_newlink()
2005 if (ops->validate) { in rtnl_newlink()
2006 err = ops->validate(tb, data); in rtnl_newlink()
2039 if (!ops || ops != dev->rtnl_link_ops || in rtnl_newlink()
2040 !ops->changelink) in rtnl_newlink()
2043 err = ops->changelink(dev, tb, data); in rtnl_newlink()
2074 if (!ops) { in rtnl_newlink()
2080 ops = rtnl_link_ops_get(kind); in rtnl_newlink()
2081 if (ops) in rtnl_newlink()
2088 if (!ops->setup) in rtnl_newlink()
2092 snprintf(ifname, IFNAMSIZ, "%s%%d", ops->kind); in rtnl_newlink()
2100 dev = rtnl_create_link(dest_net, ifname, name_assign_type, ops, tb); in rtnl_newlink()
2108 if (ops->newlink) { in rtnl_newlink()
2109 err = ops->newlink(net, dev, tb, data); in rtnl_newlink()
2129 if (ops->newlink) { in rtnl_newlink()
2132 ops->dellink(dev, &list_kill); in rtnl_newlink()
2408 const struct net_device_ops *ops = br_dev->netdev_ops; in rtnl_fdb_add() local
2410 err = ops->ndo_fdb_add(ndm, tb, dev, addr, nlh->nlmsg_flags); in rtnl_fdb_add()
2503 const struct net_device_ops *ops = br_dev->netdev_ops; in rtnl_fdb_del() local
2505 if (ops->ndo_fdb_del) in rtnl_fdb_del()
2506 err = ops->ndo_fdb_del(ndm, tb, dev, addr); in rtnl_fdb_del()
2592 const struct net_device_ops *ops = NULL; in rtnl_fdb_dump() local
2613 ops = br_dev->netdev_ops; in rtnl_fdb_dump()
2638 cops = ops; in rtnl_fdb_dump()
2734 const struct net_device_ops *ops = dev->netdev_ops; in rtnl_bridge_getlink() local
2745 if (ops->ndo_bridge_getlink) { in rtnl_bridge_getlink()
2747 ops->ndo_bridge_getlink(skb, portid, seq, dev, in rtnl_bridge_getlink()