[dpdk-dev] [PATCH] i40e: Fix a vlan bug

Xie, Huawei huawei.xie at intel.com
Fri Dec 5 05:56:15 CET 2014


Hi Thomas:
I will continue work on this fix.
Do you have comments to the v4 patch?
For Bruce's comment, I add some descriptive commit message for the commit.
For the constant number, I define a macro as the wrapper for the VFA array index and value.

One question is it isn't based on latest commit, but I tried applying the patch, there is no problem.
+/*
+ * vlan_id is a 12 bit number.
+ * The VFTA array is actually a 4096 bit array, 128 of 32bit elements.
+ * 2^5 = 32. The val of lower 5 bits specifies the bit in the 32bit element.
+ * The higher 7 bit val specifies VFTA array index.
+ */
+#define I40E_VFTA_BIT(vlan_id)    (1 << ((vlan_id) & 0x1F))
+#define I40E_VFTA_IDX(vlan_id)    ((vlan_id) >> 5)


More information about the dev mailing list