numam-dpdk/drivers/net/fm10k/base
Qi Zhang a5db0e8004 net/fm10k/base: improve VF multi-bit VLAN update requests
The VF uses a multi-bit update request to clear unused VLANs whenever it
resets. However, an accident in a previous refactor broke multi-bit
updates for VFs, due to misreading a comment in fm10k_vf.c and
attempting to reduce code duplication. The problem occurs because
a multi-bit request has a non-zero length, and the PF would simply drop
any request with the upper 16 bits set. In addition, a multi-bit vlan
update does not have a concept for "VLAN 0" as the single bit update
does.

A previous revision of this patch resolved the issue by simply removing
the upper 16 bit check and the iov_select_vid checks. However, this would
remove the checks for default VID and for ensuring no other VLANs can be
enabled except pf_vid when it has been set. To resolve that issue, this
revision uses the iov_select_vid when we have a single-bit update, and
denies any multi-bit update when the VLAN was administratively set by
the PF. This should be ok since the PF properly updates VLAN_TABLE when
it assigns the PF vid. This ensures that requests to add or "remove" the
PF vid work as expected, but a rogue VF could not use the multi-bit
update as a loophole to attempt receiving traffic on other VLANs.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-04 15:52:52 +02:00
..
fm10k_api.c fm10k/base: allow removal of slot appropriate check 2016-03-16 18:51:44 +01:00
fm10k_api.h fm10k/base: allow removal of slot appropriate check 2016-03-16 18:51:44 +01:00
fm10k_common.c fm10k: move to drivers/net/ 2015-05-22 16:06:22 +02:00
fm10k_common.h fm10k: move to drivers/net/ 2015-05-22 16:06:22 +02:00
fm10k_mbx.c fm10k/base: improve comments 2016-03-16 18:51:44 +01:00
fm10k_mbx.h fm10k/base: minor cleanups 2016-03-16 18:51:44 +01:00
fm10k_osdep.h net/fm10k/base: expose macros needed by DPDK 2017-04-04 15:52:52 +02:00
fm10k_pf.c net/fm10k/base: improve VF multi-bit VLAN update requests 2017-04-04 15:52:52 +02:00
fm10k_pf.h net/fm10k/base: add error code 2017-04-04 15:52:52 +02:00
fm10k_tlv.c net/fm10k/base: clean up the logic 2017-04-04 15:52:52 +02:00
fm10k_tlv.h fm10k/base: improve comments 2016-03-16 18:51:44 +01:00
fm10k_type.h net/fm10k/base: use different name for override bit 2017-04-04 15:52:52 +02:00
fm10k_vf.c net/fm10k/base: update comment regarding reserved bits check 2017-04-04 15:52:52 +02:00
fm10k_vf.h fm10k/base: add clock offset message 2015-10-07 13:35:48 +02:00