33 #include <linux/netdevice.h>
34 #include <linux/module.h>
66 static int ipoib_changelink(
struct net_device *dev,
73 mode = nla_get_u16(data[IFLA_IPOIB_MODE]);
86 umcast = nla_get_u16(data[IFLA_IPOIB_UMCAST]);
94 static int ipoib_new_child_link(
struct net *src_net,
struct net_device *dev,
109 ppriv = netdev_priv(pdev);
112 ipoib_warn(ppriv,
"child creation disallowed for child devices\n");
117 ipoib_dbg(ppriv,
"no pkey specified, using parent pkey\n");
118 child_pkey = ppriv->
pkey;
120 child_pkey = nla_get_u16(data[IFLA_IPOIB_PKEY]);
125 err = ipoib_changelink(dev, tb, data);
133 priv = netdev_priv(dev);
134 ppriv = netdev_priv(priv->
parent);
142 static size_t ipoib_get_size(
const struct net_device *dev)
144 return nla_total_size(2) +
152 .policy = ipoib_policy,
155 .newlink = ipoib_new_child_link,
156 .changelink = ipoib_changelink,
157 .dellink = ipoib_unregister_child_dev,
158 .get_size = ipoib_get_size,
159 .fill_info = ipoib_fill_info,