On 2/14/2024 10:17 PM, Long Li wrote:
>> +#define HN_VLAN_CFI_SHIFT 12
>> +#define HN_VLAN_PRI_SHIFT 13
>> +#define HN_VLAN_PRI_MASK0xe000 /* Priority Code Point */
>> +#define HN_VLAN_CFI_MASK0x1000 /* Canonical Format Indicator / Drop
>> Eligible Indicator */
>> +#define HN_VLAN_VID_M
> +#define HN_VLAN_CFI_SHIFT12
> +#define HN_VLAN_PRI_SHIFT13
> +#define HN_VLAN_PRI_MASK 0xe000 /* Priority Code Point */
> +#define HN_VLAN_CFI_MASK 0x1000 /* Canonical Format Indicator / Drop
> Eligible Indicator */
> +#define HN_VLAN_VID_MASK 0x0fff /* VLAN Identifier */
> +
The previous code incorrectly parsed the VLAN ID and priority.
If the 16-bits of VLAN ID and priority/CFI on the wire was
0123456789ABCDEF the code parsed it as 456789ABCDEF3012. There
were macros defined to handle this conversion but they were not
used.
Fixes: 4e9c73e96e83 ("net/netvsc: add Hype
3 matches
Mail list logo