[lldp-devel] [PATCH] vdp22 remove pcp and ps from structure definition
john.fastabend at gmail.com
Tue Nov 19 08:40:45 UTC 2013
On 11/15/2013 02:01 AM, Thomas-Mich Richter wrote:
>> Is the following actually equivalent?
>>> - if (fp->pcp & ~7)
>> this is checking if the 4th bit is set (abcd & 1000) = a000
>>> + if (vdp22_get_qos(fp->vlan) > 15)
>> and this is checking if the 4bits are greater than 15. What about
>> vdp22_get_qos(vlan) = 1001 = 9? Did you mean greater than 7?
> I have rethought about this.
> vdp22_get_qos() returns the MSB nibble which contains PS and PCP.
> The number can not be higher than 15 so this new check is obsolete and
> we can drop it entirely. (Can you do this or should I submit a new one?)
> The idea behind this was to ease comparisons. PS and PCP is only
> set on return TLVs from switch. The find out if the reply differs
> it is sufficient to compare the 4 bits entirely.
> There is no need to differentiate between PS and PCP. I think this
> was overkill on my side.
OK, I dropped the check. Please check the commit.
John Fastabend Intel Corporation
More information about the lldp-devel