Subject: Re: [net-next 03/14] i40e: assign correct vector to VF

From: Sergei Shtylyov <[email-masked]>
Date: Fri, 18 Oct 2013 18:08:30 +0400

Hello.

On 18-10-2013 17:23, Jeff Kirsher wrote:

> From: Mitch Williams <[email-masked]>

> Correct math error when assigning MSI-X vectors to VFs. The vectors-per-vf
> value reported by the hardware already conveniently reports one less than the
> actual value.

> Signed-off-by: Mitch Williams <[email-masked]>
> Signed-off-by: Jesse Brandeburg <[email-masked]>
> Tested-by: Sibai Li <[email-masked]>
> Signed-off-by: Jeff Kirsher <[email-masked]>
> ---
>   drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

> diff --git a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> index 8967e58..202139f 100644
> --- a/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> +++ b/drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
> @@ -251,7 +251,7 @@ static void i40e_config_irq_link_list(struct i40e_vf *vf, u16 vsi_idx,
>   		reg_idx = I40E_VPINT_LNKLST0(vf->vf_id);
>   	else
>   		reg_idx = I40E_VPINT_LNKLSTN(
> -			    ((pf->hw.func_caps.num_msix_vectors_vf - 1)
> +			    ((pf->hw.func_caps.num_msix_vectors_vf)

    Why keep the parens if you've removed -1?

WBR, Sergei