From: Qi Zhang Date: Wed, 8 Mar 2017 06:18:57 +0000 (-0500) Subject: net/fm10k/base: update comment regarding reserved bits check X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c631e94842033f74a932ebdb68812ca48cafabf3;p=dpdk.git net/fm10k/base: update comment regarding reserved bits check The original comment may be read incorrectly as referring to checking the *entire* length is zero. However, it merely checks only the reserved bits of both length and reserved in a small amount of code. Update the comment to indicate this is a clever trick and clearly spell out that it only checks the reserve bits. Signed-off-by: Qi Zhang --- diff --git a/drivers/net/fm10k/base/fm10k_vf.c b/drivers/net/fm10k/base/fm10k_vf.c index 533dfeb9a9..dd3d318750 100644 --- a/drivers/net/fm10k/base/fm10k_vf.c +++ b/drivers/net/fm10k/base/fm10k_vf.c @@ -225,7 +225,7 @@ STATIC s32 fm10k_update_vlan_vf(struct fm10k_hw *hw, u32 vid, u8 vsi, bool set) if (vsi) return FM10K_ERR_PARAM; - /* verify upper 4 bits of vid and length are 0 */ + /* clever trick to verify reserved bits in both vid and length */ if ((vid << 16 | vid) >> 28) return FM10K_ERR_PARAM;