diff options
author | Avinash Dayanand <avinash.dayanand@intel.com> | 2019-05-14 20:37:03 +0300 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2019-06-18 01:39:26 +0300 |
commit | 16e00c25ac36d09c077aa0f296e053538096a48d (patch) | |
tree | 2d821890970c27e86ef1b3bf51771e69e22fd8bd /drivers/net/ethernet/intel | |
parent | f0a48fb44138bdb0a7b02082f2fd048903478451 (diff) | |
download | linux-16e00c25ac36d09c077aa0f296e053538096a48d.tar.xz |
iavf: Fix the math for valid length for ADq enable
There was a calculation error in virtchnl regarding the valid
length which was fixed recently and a corresponding change needs
to go into the code while we enable ADq.
Signed-off-by: Avinash Dayanand <avinash.dayanand@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel')
-rw-r--r-- | drivers/net/ethernet/intel/iavf/iavf_virtchnl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c index 3eea35cee25a..dd97509e2da1 100644 --- a/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c +++ b/drivers/net/ethernet/intel/iavf/iavf_virtchnl.c @@ -983,7 +983,7 @@ void iavf_enable_channels(struct iavf_adapter *adapter) return; } - len = (adapter->num_tc * sizeof(struct virtchnl_channel_info)) + + len = ((adapter->num_tc - 1) * sizeof(struct virtchnl_channel_info)) + sizeof(struct virtchnl_tc_info); vti = kzalloc(len, GFP_KERNEL); |