Skip to content

Commit

Permalink
iavf: Fix the math for valid length for ADq enable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Avinash Dayanand authored and Jeff Kirsher committed Jun 17, 2019
1 parent f0a48fb commit 16e00c2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/iavf/iavf_virtchnl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 16e00c2

Please sign in to comment.