i40e/base: fix arq_event_info struct
authorHelin Zhang <helin.zhang@intel.com>
Tue, 9 Sep 2014 07:21:38 +0000 (15:21 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 7 Oct 2014 16:02:11 +0000 (18:02 +0200)
commit3043ce5011aa7075b32c80c79b9db96199938602
tree21efef8efb71edf71576ed4ec8f093e92b868386
parenta00b77ed12ed9b9927ffcf4b98d1c2c6263f405d
i40e/base: fix arq_event_info struct

Overloading the 'msg_size' field in the 'arq_event_info' struct
is a bad idea. It leads to bugs when the structure is used in a
loop, since the input value (buffer size) is overwritten by the
output value (actual message length). The fix introduces one
more field of 'buf_len' for the buffer size, and renames the
field of 'msg_size' to 'msg_len' for the real message size.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Reviewed-by: Chen Jing <jing.d.chen@intel.com>
Tested-by: HuilongX Xu <huilongx.xu@intel.com>
lib/librte_pmd_i40e/i40e/i40e_adminq.c
lib/librte_pmd_i40e/i40e/i40e_adminq.h
lib/librte_pmd_i40e/i40e/i40e_common.c
lib/librte_pmd_i40e/i40e/i40e_prototype.h
lib/librte_pmd_i40e/i40e_ethdev.c
lib/librte_pmd_i40e/i40e_ethdev_vf.c