net/i40e: fix flow control watermark mismatch
authorQi Zhang <qi.z.zhang@intel.com>
Thu, 10 Aug 2017 10:48:07 +0000 (18:48 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 6 Oct 2017 00:49:47 +0000 (02:49 +0200)
commit273dcde1c3e3582d39f4a0916febca7dfd518de9
tree0013f7011c33f518ac62751db02bb98f0e1001aa
parent7f109dbac5b181593f5bcd64cf891137e7c5a9cb
net/i40e: fix flow control watermark mismatch

Flow control watermark is not read out correctly,
that may cause an application who not intend to change
watermark but does change it with a rte_eth_dev_flow_ctrl_set
call right after rte_eth_dev_flow_ctrl_get.

The idea fix is, during init, the watermark is set with default value,
so it is not necessary to read out from hw register during flow_ctl_get,
But due to I40E_GLRPB_GHW limitation, it is shared by different ports on
the same device, it is possible the value is changed on another port,
but local variable not sync, so we have to read out register every
flow_ctl_get.

Fixes: f53577f06925 ("i40e: support flow control")
Cc: stable@dpdk.org
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
drivers/net/i40e/i40e_ethdev.c