amd-xgbe: Do traffic class setup when called through dcbnl
Currently the netdev traffic class setup is only performed when invoked through the ndo_setup_tc interface. However, the same setup should be performed when the dcbnl interface (ieee_setets) is invoked. Rework the netdev traffic class setup to be invokable through either interface and also provide the priority to traffic class mapping if available. Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
6a49ee4e1b
commit
b3b715974b
@@ -6,7 +6,7 @@
|
||||
*
|
||||
* License 1: GPLv2
|
||||
*
|
||||
* Copyright (c) 2014 Advanced Micro Devices, Inc.
|
||||
* Copyright (c) 2014-2016 Advanced Micro Devices, Inc.
|
||||
*
|
||||
* This file is free software; you may copy, redistribute and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -56,7 +56,7 @@
|
||||
*
|
||||
* License 2: Modified BSD
|
||||
*
|
||||
* Copyright (c) 2014 Advanced Micro Devices, Inc.
|
||||
* Copyright (c) 2014-2016 Advanced Micro Devices, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -673,6 +673,7 @@ struct xgbe_hw_if {
|
||||
u64 (*get_tx_tstamp)(struct xgbe_prv_data *);
|
||||
|
||||
/* For Data Center Bridging config */
|
||||
void (*config_tc)(struct xgbe_prv_data *);
|
||||
void (*config_dcb_tc)(struct xgbe_prv_data *);
|
||||
void (*config_dcb_pfc)(struct xgbe_prv_data *);
|
||||
|
||||
@@ -880,6 +881,7 @@ struct xgbe_prv_data {
|
||||
struct ieee_pfc *pfc;
|
||||
unsigned int q2tc_map[XGBE_MAX_QUEUES];
|
||||
unsigned int prio2q_map[IEEE_8021QAZ_MAX_TCS];
|
||||
u8 num_tcs;
|
||||
|
||||
/* Hardware features of the device */
|
||||
struct xgbe_hw_features hw_feat;
|
||||
|
Reference in New Issue
Block a user