mirror of https://gitee.com/openkylin/linux.git
nfp: flower: ignore offload of VF and PF repr MAC addresses
Currently MAC addresses of all repr netdevs, along with selected non-NFP controlled netdevs, are offloaded to FW as potential tunnel end-points. However, the addresses of VF and PF reprs are meaningless outside of internal communication and it is only those of physical port reprs required. Modify the MAC address offload selection code to ignore VF/PF repr devs. Signed-off-by: John Hurley <john.hurley@netronome.com> Reviewed-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f3b975778c
commit
41da0b5ef3
|
@ -614,11 +614,7 @@ static void nfp_tun_add_to_mac_offload_list(struct net_device *netdev,
|
|||
if (FIELD_GET(NFP_FLOWER_CMSG_PORT_TYPE, port) ==
|
||||
NFP_FLOWER_CMSG_PORT_TYPE_PHYS_PORT) {
|
||||
nfp_mac_idx = port << 8 | NFP_FLOWER_CMSG_PORT_TYPE_PHYS_PORT;
|
||||
} else if (FIELD_GET(NFP_FLOWER_CMSG_PORT_TYPE, port) ==
|
||||
NFP_FLOWER_CMSG_PORT_TYPE_PCIE_PORT) {
|
||||
port = FIELD_GET(NFP_FLOWER_CMSG_PORT_VNIC, port);
|
||||
nfp_mac_idx = port << 8 | NFP_FLOWER_CMSG_PORT_TYPE_PCIE_PORT;
|
||||
} else {
|
||||
} else if (!port) {
|
||||
/* Must assign our own unique 8-bit index. */
|
||||
int idx = nfp_tun_get_mac_idx(app, netdev->ifindex);
|
||||
|
||||
|
@ -628,6 +624,9 @@ static void nfp_tun_add_to_mac_offload_list(struct net_device *netdev,
|
|||
return;
|
||||
}
|
||||
nfp_mac_idx = idx << 8 | NFP_FLOWER_CMSG_PORT_TYPE_OTHER_PORT;
|
||||
} else {
|
||||
kfree(entry);
|
||||
return;
|
||||
}
|
||||
|
||||
entry->index = cpu_to_be16(nfp_mac_idx);
|
||||
|
|
Loading…
Reference in New Issue