]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Add dcbnl dscp to priority support
authorHuy Nguyen <huyn@mellanox.com>
Tue, 18 Jul 2017 21:23:36 +0000 (16:23 -0500)
committerSaeed Mahameed <saeedm@mellanox.com>
Sun, 5 Nov 2017 04:26:31 +0000 (21:26 -0700)
commit2b6461a286b7e7783d65485330b2222c3230d114
treecc136277edec65763f0fa50a39e3291e398076c6
parent327adadc3b57504fbe1fbfa5f8064f1e22f5d168
net/mlx5e: Add dcbnl dscp to priority support

This patch implements dcbnl hooks to set and delete DSCP to priority map
as defined by the DCB subsystem. Device maintains internal trust state
which needs to be set to DSCP state for performing DSCP to priority mapping.

When the first dscp to priority APP entry is added by the user, the
trust state is changed to dscp.

When the last dscp to priority APP entry is deleted by the user, the
trust state is changed to pcp.

If user sends multiple dscp to priority APP entries on the same dscp,
the last sent one will take effect. All the previous sent will be
deleted.

The dscp to priority APP entries are added and deleted in the net/dcb
APP database using dcb_ieee_setapp/getapp.

Signed-off-by: Huy Nguyen <huyn@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
drivers/net/ethernet/mellanox/mlx5/core/en_main.c