rtnetlink.c (bd2463ac7d7ec51d432f23bf0e893fb371a908cd) rtnetlink.c (9fbf082f569980ddd7cab348e0a118678db0e47e)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * INET An implementation of the TCP/IP protocol suite for the LINUX
4 * operating system. INET is implemented using the BSD Socket
5 * interface as the means of communication with the user level.
6 *
7 * Routing netlink socket interface: protocol independent part.
8 *

--- 1228 unchanged lines hidden (view full) ---

1237 */
1238 ivi.linkstate = 0;
1239 /* VLAN Protocol by default is 802.1Q */
1240 ivi.vlan_proto = htons(ETH_P_8021Q);
1241 if (dev->netdev_ops->ndo_get_vf_config(dev, vfs_num, &ivi))
1242 return 0;
1243
1244 memset(&vf_vlan_info, 0, sizeof(vf_vlan_info));
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * INET An implementation of the TCP/IP protocol suite for the LINUX
4 * operating system. INET is implemented using the BSD Socket
5 * interface as the means of communication with the user level.
6 *
7 * Routing netlink socket interface: protocol independent part.
8 *

--- 1228 unchanged lines hidden (view full) ---

1237 */
1238 ivi.linkstate = 0;
1239 /* VLAN Protocol by default is 802.1Q */
1240 ivi.vlan_proto = htons(ETH_P_8021Q);
1241 if (dev->netdev_ops->ndo_get_vf_config(dev, vfs_num, &ivi))
1242 return 0;
1243
1244 memset(&vf_vlan_info, 0, sizeof(vf_vlan_info));
1245 memset(&node_guid, 0, sizeof(node_guid));
1246 memset(&port_guid, 0, sizeof(port_guid));
1245
1246 vf_mac.vf =
1247 vf_vlan.vf =
1248 vf_vlan_info.vf =
1249 vf_rate.vf =
1250 vf_tx_rate.vf =
1251 vf_spoofchk.vf =
1252 vf_linkstate.vf =

--- 32 unchanged lines hidden (view full) ---

1285 &vf_linkstate) ||
1286 nla_put(skb, IFLA_VF_RSS_QUERY_EN,
1287 sizeof(vf_rss_query_en),
1288 &vf_rss_query_en) ||
1289 nla_put(skb, IFLA_VF_TRUST,
1290 sizeof(vf_trust), &vf_trust))
1291 goto nla_put_vf_failure;
1292
1247
1248 vf_mac.vf =
1249 vf_vlan.vf =
1250 vf_vlan_info.vf =
1251 vf_rate.vf =
1252 vf_tx_rate.vf =
1253 vf_spoofchk.vf =
1254 vf_linkstate.vf =

--- 32 unchanged lines hidden (view full) ---

1287 &vf_linkstate) ||
1288 nla_put(skb, IFLA_VF_RSS_QUERY_EN,
1289 sizeof(vf_rss_query_en),
1290 &vf_rss_query_en) ||
1291 nla_put(skb, IFLA_VF_TRUST,
1292 sizeof(vf_trust), &vf_trust))
1293 goto nla_put_vf_failure;
1294
1293 memset(&node_guid, 0, sizeof(node_guid));
1294 memset(&port_guid, 0, sizeof(port_guid));
1295 if (dev->netdev_ops->ndo_get_vf_guid &&
1296 !dev->netdev_ops->ndo_get_vf_guid(dev, vfs_num, &node_guid,
1297 &port_guid)) {
1298 if (nla_put(skb, IFLA_VF_IB_NODE_GUID, sizeof(node_guid),
1299 &node_guid) ||
1300 nla_put(skb, IFLA_VF_IB_PORT_GUID, sizeof(port_guid),
1301 &port_guid))
1302 goto nla_put_vf_failure;

--- 4260 unchanged lines hidden ---
1295 if (dev->netdev_ops->ndo_get_vf_guid &&
1296 !dev->netdev_ops->ndo_get_vf_guid(dev, vfs_num, &node_guid,
1297 &port_guid)) {
1298 if (nla_put(skb, IFLA_VF_IB_NODE_GUID, sizeof(node_guid),
1299 &node_guid) ||
1300 nla_put(skb, IFLA_VF_IB_PORT_GUID, sizeof(port_guid),
1301 &port_guid))
1302 goto nla_put_vf_failure;

--- 4260 unchanged lines hidden ---