Commit 34173751 authored by Diana Wang's avatar Diana Wang Committed by sanglipeng
Browse files

nfp: fill splittable of devlink_port_attrs correctly

stable inclusion
from stable-v5.10.157
commit ce41e03cacaa1f15539785a381ef0a27cf6d25da
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7MU59

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ce41e03cacaa1f15539785a381ef0a27cf6d25da



--------------------------------

[ Upstream commit 4abd9600 ]

The error is reflected in that it shows wrong splittable status of
port when executing "devlink port show".
The reason which leads the error is that the assigned operation of
splittable is just a simple negation operation of split and it does
not consider port lanes quantity. A splittable port should have
several lanes that can be split(lanes quantity > 1).
If without the judgement, it will show wrong message for some
firmware, such as 2x25G, 2x10G.

Fixes: a0f49b54 ("devlink: Add a new devlink port split ability attribute and pass to netlink")
Signed-off-by: default avatarDiana Wang <na.wang@corigine.com>
Reviewed-by: default avatarLouis Peens <louis.peens@corigine.com>
Reviewed-by: default avatarNiklas Söderlund <niklas.soderlund@corigine.com>
Signed-off-by: default avatarSimon Horman <simon.horman@corigine.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent c7265df4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment