[lldp-devel] [PATCH] vdp22 remove pcp and ps from structure definition

Thomas-Mich Richter tmricht at linux.vnet.ibm.com
Fri Nov 15 10:01:23 UTC 2013

> 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.

Thomas Richter, Dept 3250, IBM LTC Boeblingen, Data Center Networking
Vorsitzende des Aufsichtsrats: Martina Koederitz 
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294

More information about the lldp-devel mailing list