[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20151208.224519.806579181027596160.davem@davemloft.net>
Date: Tue, 08 Dec 2015 22:45:19 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: p.fedin@...sung.com
Cc: netdev@...r.kernel.org, sgoutham@...ium.com, rric@...nel.org,
sunil.kovvuri@...il.com, youngmin.lee@...ium.com,
kin-yip.liu@...ium.com
Subject: Re: [PATCH v2] net: thunderx: Correctly distinguish between VF and
LMAC count
From: Pavel Fedin <p.fedin@...sung.com>
Date: Tue, 08 Dec 2015 10:37:44 +0300
> Commit bc69fdfc6c13
> ("net: thunderx: Enable BGX LMAC's RX/TX only after VF is up")
> introduces lmac_cnt member and starts verifying VF number against it.
> This is plain wrong, and works only because currently we have hardcoded
> 1:1 mapping between VFs and LMACs, and in this case num_vf_en and
> lmac_cnt are always equal. However in future this may change, and the
> code will badly misbehave. The worst consequence of this is failure to
> deliver link status messages, causing VFs to go defunct because since
> commit 0b72a9a1060e ("net: thunderx: Switchon carrier only upon
> interface link up") VF will not fully bring itself up without it.
>
> This patch fixes the potential problem by doing VF number checks against
> the num_vf_en. Since lmac_cnt is not used anywhere else, it is removed.
>
> Additionally some duplicated code is factored out into nic_enable_vf()
>
> Signed-off-by: Pavel Fedin <p.fedin@...sung.com>
Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists