net/i40e: fix disabling flex payload selection rule
authorJingjing Wu <jingjing.wu@intel.com>
Thu, 12 May 2016 08:11:40 +0000 (16:11 +0800)
committerBruce Richardson <bruce.richardson@intel.com>
Wed, 15 Jun 2016 15:13:55 +0000 (17:13 +0200)
commit19fec29373ea237b68a54817cea00d94521021b7
tree39c9ec2a965c61a1c4d18720b3880e20ba3a3f6e
parentca7e599d4506f3d6b89dd846c901d09d46ea593c
net/i40e: fix disabling flex payload selection rule

When setting up the flexible paylaod selection rules, the value
NONUSE_FLX_PIT_DEST_OFF (== 63) is meant to disable the rule.
However, since the MK_FLX_PIT macro always added on an additional
offset of I40E_FLX_OFFSET_IN_FIELD_VECTOR (== 50) to the value passed
the functionality to disable the rule was broken.
This patch fixes this by checking for the disable value and not adding
the offset in that case.

Fixes: d8b90c4eabe9 ("i40e: take flow director flexible payload configuration")

Reported-by: Michael Habibi <mikehabibi@gmail.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Acked-by: Zhe Tao <zhe.tao@intel.com>
drivers/net/i40e/i40e_fdir.c