]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
net/mlx5e: Read ETS settings directly from firmware
[karo-tx-linux.git] / drivers / net / ethernet / mellanox / mlx5 / core / en_dcbnl.c
1 /*
2  * Copyright (c) 2016, Mellanox Technologies. All rights reserved.
3  *
4  * This software is available to you under a choice of one of two
5  * licenses.  You may choose to be licensed under the terms of the GNU
6  * General Public License (GPL) Version 2, available from the file
7  * COPYING in the main directory of this source tree, or the
8  * OpenIB.org BSD license below:
9  *
10  *     Redistribution and use in source and binary forms, with or
11  *     without modification, are permitted provided that the following
12  *     conditions are met:
13  *
14  *      - Redistributions of source code must retain the above
15  *        copyright notice, this list of conditions and the following
16  *        disclaimer.
17  *
18  *      - Redistributions in binary form must reproduce the above
19  *        copyright notice, this list of conditions and the following
20  *        disclaimer in the documentation and/or other materials
21  *        provided with the distribution.
22  *
23  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
24  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
25  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
26  * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
27  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
28  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
29  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30  * SOFTWARE.
31  */
32 #include <linux/device.h>
33 #include <linux/netdevice.h>
34 #include "en.h"
35
36 #define MLX5E_MAX_PRIORITY 8
37
38 #define MLX5E_100MB (100000)
39 #define MLX5E_1GB   (1000000)
40
41 #define MLX5E_CEE_STATE_UP    1
42 #define MLX5E_CEE_STATE_DOWN  0
43
44 static int mlx5e_dcbnl_ieee_getets(struct net_device *netdev,
45                                    struct ieee_ets *ets)
46 {
47         struct mlx5e_priv *priv = netdev_priv(netdev);
48         struct mlx5_core_dev *mdev = priv->mdev;
49         int err = 0;
50         int i;
51
52         if (!MLX5_CAP_GEN(priv->mdev, ets))
53                 return -ENOTSUPP;
54
55         ets->ets_cap = mlx5_max_tc(priv->mdev) + 1;
56         for (i = 0; i < ets->ets_cap; i++) {
57                 err = mlx5_query_port_prio_tc(mdev, i, &ets->prio_tc[i]);
58                 if (err)
59                         return err;
60         }
61
62         for (i = 0; i < ets->ets_cap; i++) {
63                 err = mlx5_query_port_tc_bw_alloc(mdev, i, &ets->tc_tx_bw[i]);
64                 if (err)
65                         return err;
66                 if (ets->tc_tx_bw[i] < MLX5E_MAX_BW_ALLOC)
67                         priv->dcbx.tc_tsa[i] = IEEE_8021QAZ_TSA_ETS;
68         }
69
70         memcpy(ets->tc_tsa, priv->dcbx.tc_tsa, sizeof(ets->tc_tsa));
71
72         return err;
73 }
74
75 enum {
76         MLX5E_VENDOR_TC_GROUP_NUM = 7,
77         MLX5E_ETS_TC_GROUP_NUM    = 0,
78 };
79
80 static void mlx5e_build_tc_group(struct ieee_ets *ets, u8 *tc_group, int max_tc)
81 {
82         bool any_tc_mapped_to_ets = false;
83         int strict_group;
84         int i;
85
86         for (i = 0; i <= max_tc; i++)
87                 if (ets->tc_tsa[i] == IEEE_8021QAZ_TSA_ETS)
88                         any_tc_mapped_to_ets = true;
89
90         strict_group = any_tc_mapped_to_ets ? 1 : 0;
91
92         for (i = 0; i <= max_tc; i++) {
93                 switch (ets->tc_tsa[i]) {
94                 case IEEE_8021QAZ_TSA_VENDOR:
95                         tc_group[i] = MLX5E_VENDOR_TC_GROUP_NUM;
96                         break;
97                 case IEEE_8021QAZ_TSA_STRICT:
98                         tc_group[i] = strict_group++;
99                         break;
100                 case IEEE_8021QAZ_TSA_ETS:
101                         tc_group[i] = MLX5E_ETS_TC_GROUP_NUM;
102                         break;
103                 }
104         }
105 }
106
107 static void mlx5e_build_tc_tx_bw(struct ieee_ets *ets, u8 *tc_tx_bw,
108                                  u8 *tc_group, int max_tc)
109 {
110         int i;
111
112         for (i = 0; i <= max_tc; i++) {
113                 switch (ets->tc_tsa[i]) {
114                 case IEEE_8021QAZ_TSA_VENDOR:
115                         tc_tx_bw[i] = MLX5E_MAX_BW_ALLOC;
116                         break;
117                 case IEEE_8021QAZ_TSA_STRICT:
118                         tc_tx_bw[i] = MLX5E_MAX_BW_ALLOC;
119                         break;
120                 case IEEE_8021QAZ_TSA_ETS:
121                         tc_tx_bw[i] = ets->tc_tx_bw[i];
122                         break;
123                 }
124         }
125 }
126
127 int mlx5e_dcbnl_ieee_setets_core(struct mlx5e_priv *priv, struct ieee_ets *ets)
128 {
129         struct mlx5_core_dev *mdev = priv->mdev;
130         u8 tc_tx_bw[IEEE_8021QAZ_MAX_TCS];
131         u8 tc_group[IEEE_8021QAZ_MAX_TCS];
132         int max_tc = mlx5_max_tc(mdev);
133         int err;
134
135         mlx5e_build_tc_group(ets, tc_group, max_tc);
136         mlx5e_build_tc_tx_bw(ets, tc_tx_bw, tc_group, max_tc);
137
138         err = mlx5_set_port_prio_tc(mdev, ets->prio_tc);
139         if (err)
140                 return err;
141
142         err = mlx5_set_port_tc_group(mdev, tc_group);
143         if (err)
144                 return err;
145
146         err = mlx5_set_port_tc_bw_alloc(mdev, tc_tx_bw);
147
148         if (err)
149                 return err;
150
151         memcpy(priv->dcbx.tc_tsa, ets->tc_tsa, sizeof(ets->tc_tsa));
152
153         return err;
154 }
155
156 static int mlx5e_dbcnl_validate_ets(struct net_device *netdev,
157                                     struct ieee_ets *ets)
158 {
159         int bw_sum = 0;
160         int i;
161
162         /* Validate Priority */
163         for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
164                 if (ets->prio_tc[i] >= MLX5E_MAX_PRIORITY) {
165                         netdev_err(netdev,
166                                    "Failed to validate ETS: priority value greater than max(%d)\n",
167                                     MLX5E_MAX_PRIORITY);
168                         return -EINVAL;
169                 }
170         }
171
172         /* Validate Bandwidth Sum */
173         for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
174                 if (ets->tc_tsa[i] == IEEE_8021QAZ_TSA_ETS) {
175                         if (!ets->tc_tx_bw[i]) {
176                                 netdev_err(netdev,
177                                            "Failed to validate ETS: BW 0 is illegal\n");
178                                 return -EINVAL;
179                         }
180
181                         bw_sum += ets->tc_tx_bw[i];
182                 }
183         }
184
185         if (bw_sum != 0 && bw_sum != 100) {
186                 netdev_err(netdev,
187                            "Failed to validate ETS: BW sum is illegal\n");
188                 return -EINVAL;
189         }
190         return 0;
191 }
192
193 static int mlx5e_dcbnl_ieee_setets(struct net_device *netdev,
194                                    struct ieee_ets *ets)
195 {
196         struct mlx5e_priv *priv = netdev_priv(netdev);
197         int err;
198
199         if (!MLX5_CAP_GEN(priv->mdev, ets))
200                 return -ENOTSUPP;
201
202         err = mlx5e_dbcnl_validate_ets(netdev, ets);
203         if (err)
204                 return err;
205
206         err = mlx5e_dcbnl_ieee_setets_core(priv, ets);
207         if (err)
208                 return err;
209
210         return 0;
211 }
212
213 static int mlx5e_dcbnl_ieee_getpfc(struct net_device *dev,
214                                    struct ieee_pfc *pfc)
215 {
216         struct mlx5e_priv *priv = netdev_priv(dev);
217         struct mlx5_core_dev *mdev = priv->mdev;
218         struct mlx5e_pport_stats *pstats = &priv->stats.pport;
219         int i;
220
221         pfc->pfc_cap = mlx5_max_tc(mdev) + 1;
222         for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
223                 pfc->requests[i]    = PPORT_PER_PRIO_GET(pstats, i, tx_pause);
224                 pfc->indications[i] = PPORT_PER_PRIO_GET(pstats, i, rx_pause);
225         }
226
227         return mlx5_query_port_pfc(mdev, &pfc->pfc_en, NULL);
228 }
229
230 static int mlx5e_dcbnl_ieee_setpfc(struct net_device *dev,
231                                    struct ieee_pfc *pfc)
232 {
233         struct mlx5e_priv *priv = netdev_priv(dev);
234         struct mlx5_core_dev *mdev = priv->mdev;
235         u8 curr_pfc_en;
236         int ret;
237
238         mlx5_query_port_pfc(mdev, &curr_pfc_en, NULL);
239
240         if (pfc->pfc_en == curr_pfc_en)
241                 return 0;
242
243         ret = mlx5_set_port_pfc(mdev, pfc->pfc_en, pfc->pfc_en);
244         mlx5_toggle_port_link(mdev);
245
246         return ret;
247 }
248
249 static u8 mlx5e_dcbnl_getdcbx(struct net_device *dev)
250 {
251         return DCB_CAP_DCBX_HOST |
252                DCB_CAP_DCBX_VER_IEEE |
253                DCB_CAP_DCBX_VER_CEE;
254 }
255
256 static u8 mlx5e_dcbnl_setdcbx(struct net_device *dev, u8 mode)
257 {
258         if ((mode & DCB_CAP_DCBX_LLD_MANAGED) ||
259             !(mode & DCB_CAP_DCBX_VER_CEE) ||
260             !(mode & DCB_CAP_DCBX_VER_IEEE) ||
261             !(mode & DCB_CAP_DCBX_HOST))
262                 return 1;
263
264         return 0;
265 }
266
267 static int mlx5e_dcbnl_ieee_getmaxrate(struct net_device *netdev,
268                                        struct ieee_maxrate *maxrate)
269 {
270         struct mlx5e_priv *priv    = netdev_priv(netdev);
271         struct mlx5_core_dev *mdev = priv->mdev;
272         u8 max_bw_value[IEEE_8021QAZ_MAX_TCS];
273         u8 max_bw_unit[IEEE_8021QAZ_MAX_TCS];
274         int err;
275         int i;
276
277         err = mlx5_query_port_ets_rate_limit(mdev, max_bw_value, max_bw_unit);
278         if (err)
279                 return err;
280
281         memset(maxrate->tc_maxrate, 0, sizeof(maxrate->tc_maxrate));
282
283         for (i = 0; i <= mlx5_max_tc(mdev); i++) {
284                 switch (max_bw_unit[i]) {
285                 case MLX5_100_MBPS_UNIT:
286                         maxrate->tc_maxrate[i] = max_bw_value[i] * MLX5E_100MB;
287                         break;
288                 case MLX5_GBPS_UNIT:
289                         maxrate->tc_maxrate[i] = max_bw_value[i] * MLX5E_1GB;
290                         break;
291                 case MLX5_BW_NO_LIMIT:
292                         break;
293                 default:
294                         WARN(true, "non-supported BW unit");
295                         break;
296                 }
297         }
298
299         return 0;
300 }
301
302 static int mlx5e_dcbnl_ieee_setmaxrate(struct net_device *netdev,
303                                        struct ieee_maxrate *maxrate)
304 {
305         struct mlx5e_priv *priv    = netdev_priv(netdev);
306         struct mlx5_core_dev *mdev = priv->mdev;
307         u8 max_bw_value[IEEE_8021QAZ_MAX_TCS];
308         u8 max_bw_unit[IEEE_8021QAZ_MAX_TCS];
309         __u64 upper_limit_mbps = roundup(255 * MLX5E_100MB, MLX5E_1GB);
310         int i;
311
312         memset(max_bw_value, 0, sizeof(max_bw_value));
313         memset(max_bw_unit, 0, sizeof(max_bw_unit));
314
315         for (i = 0; i <= mlx5_max_tc(mdev); i++) {
316                 if (!maxrate->tc_maxrate[i]) {
317                         max_bw_unit[i]  = MLX5_BW_NO_LIMIT;
318                         continue;
319                 }
320                 if (maxrate->tc_maxrate[i] < upper_limit_mbps) {
321                         max_bw_value[i] = div_u64(maxrate->tc_maxrate[i],
322                                                   MLX5E_100MB);
323                         max_bw_value[i] = max_bw_value[i] ? max_bw_value[i] : 1;
324                         max_bw_unit[i]  = MLX5_100_MBPS_UNIT;
325                 } else {
326                         max_bw_value[i] = div_u64(maxrate->tc_maxrate[i],
327                                                   MLX5E_1GB);
328                         max_bw_unit[i]  = MLX5_GBPS_UNIT;
329                 }
330         }
331
332         return mlx5_modify_port_ets_rate_limit(mdev, max_bw_value, max_bw_unit);
333 }
334
335 static u8 mlx5e_dcbnl_setall(struct net_device *netdev)
336 {
337         struct mlx5e_priv *priv = netdev_priv(netdev);
338         struct mlx5e_cee_config *cee_cfg = &priv->dcbx.cee_cfg;
339         struct mlx5_core_dev *mdev = priv->mdev;
340         struct ieee_ets ets;
341         struct ieee_pfc pfc;
342         int err = -ENOTSUPP;
343         int i;
344
345         if (!MLX5_CAP_GEN(mdev, ets))
346                 goto out;
347
348         memset(&ets, 0, sizeof(ets));
349         memset(&pfc, 0, sizeof(pfc));
350
351         ets.ets_cap = IEEE_8021QAZ_MAX_TCS;
352         for (i = 0; i < CEE_DCBX_MAX_PGS; i++) {
353                 ets.tc_tx_bw[i] = cee_cfg->pg_bw_pct[i];
354                 ets.tc_rx_bw[i] = cee_cfg->pg_bw_pct[i];
355                 ets.tc_tsa[i]   = IEEE_8021QAZ_TSA_ETS;
356                 ets.prio_tc[i]  = cee_cfg->prio_to_pg_map[i];
357         }
358
359         err = mlx5e_dbcnl_validate_ets(netdev, &ets);
360         if (err) {
361                 netdev_err(netdev,
362                            "%s, Failed to validate ETS: %d\n", __func__, err);
363                 goto out;
364         }
365
366         err = mlx5e_dcbnl_ieee_setets_core(priv, &ets);
367         if (err) {
368                 netdev_err(netdev,
369                            "%s, Failed to set ETS: %d\n", __func__, err);
370                 goto out;
371         }
372
373         /* Set PFC */
374         pfc.pfc_cap = mlx5_max_tc(mdev) + 1;
375         if (!cee_cfg->pfc_enable)
376                 pfc.pfc_en = 0;
377         else
378                 for (i = 0; i < CEE_DCBX_MAX_PRIO; i++)
379                         pfc.pfc_en |= cee_cfg->pfc_setting[i] << i;
380
381         err = mlx5e_dcbnl_ieee_setpfc(netdev, &pfc);
382         if (err) {
383                 netdev_err(netdev,
384                            "%s, Failed to set PFC: %d\n", __func__, err);
385                 goto out;
386         }
387 out:
388         return err ? MLX5_DCB_NO_CHG : MLX5_DCB_CHG_RESET;
389 }
390
391 static u8 mlx5e_dcbnl_getstate(struct net_device *netdev)
392 {
393         return MLX5E_CEE_STATE_UP;
394 }
395
396 static void mlx5e_dcbnl_getpermhwaddr(struct net_device *netdev,
397                                       u8 *perm_addr)
398 {
399         struct mlx5e_priv *priv = netdev_priv(netdev);
400
401         if (!perm_addr)
402                 return;
403
404         mlx5_query_nic_vport_mac_address(priv->mdev, 0, perm_addr);
405 }
406
407 static void mlx5e_dcbnl_setpgtccfgtx(struct net_device *netdev,
408                                      int priority, u8 prio_type,
409                                      u8 pgid, u8 bw_pct, u8 up_map)
410 {
411         struct mlx5e_priv *priv = netdev_priv(netdev);
412         struct mlx5e_cee_config *cee_cfg = &priv->dcbx.cee_cfg;
413
414         if (priority >= CEE_DCBX_MAX_PRIO) {
415                 netdev_err(netdev,
416                            "%s, priority is out of range\n", __func__);
417                 return;
418         }
419
420         if (pgid >= CEE_DCBX_MAX_PGS) {
421                 netdev_err(netdev,
422                            "%s, priority group is out of range\n", __func__);
423                 return;
424         }
425
426         cee_cfg->prio_to_pg_map[priority] = pgid;
427 }
428
429 static void mlx5e_dcbnl_setpgbwgcfgtx(struct net_device *netdev,
430                                       int pgid, u8 bw_pct)
431 {
432         struct mlx5e_priv *priv = netdev_priv(netdev);
433         struct mlx5e_cee_config *cee_cfg = &priv->dcbx.cee_cfg;
434
435         if (pgid >= CEE_DCBX_MAX_PGS) {
436                 netdev_err(netdev,
437                            "%s, priority group is out of range\n", __func__);
438                 return;
439         }
440
441         cee_cfg->pg_bw_pct[pgid] = bw_pct;
442 }
443
444 static void mlx5e_dcbnl_getpgtccfgtx(struct net_device *netdev,
445                                      int priority, u8 *prio_type,
446                                      u8 *pgid, u8 *bw_pct, u8 *up_map)
447 {
448         struct mlx5e_priv *priv = netdev_priv(netdev);
449         struct mlx5_core_dev *mdev = priv->mdev;
450
451         if (priority >= CEE_DCBX_MAX_PRIO) {
452                 netdev_err(netdev,
453                            "%s, priority is out of range\n", __func__);
454                 return;
455         }
456
457         *prio_type = 0;
458         *bw_pct = 0;
459         *up_map = 0;
460
461         if (mlx5_query_port_prio_tc(mdev, priority, pgid))
462                 *pgid = 0;
463 }
464
465 static void mlx5e_dcbnl_getpgbwgcfgtx(struct net_device *netdev,
466                                       int pgid, u8 *bw_pct)
467 {
468         struct mlx5e_priv *priv = netdev_priv(netdev);
469         struct mlx5_core_dev *mdev = priv->mdev;
470
471         if (pgid >= CEE_DCBX_MAX_PGS) {
472                 netdev_err(netdev,
473                            "%s, priority group is out of range\n", __func__);
474                 return;
475         }
476
477         if (mlx5_query_port_tc_bw_alloc(mdev, pgid, bw_pct))
478                 *bw_pct = 0;
479 }
480
481 static void mlx5e_dcbnl_setpfccfg(struct net_device *netdev,
482                                   int priority, u8 setting)
483 {
484         struct mlx5e_priv *priv = netdev_priv(netdev);
485         struct mlx5e_cee_config *cee_cfg = &priv->dcbx.cee_cfg;
486
487         if (priority >= CEE_DCBX_MAX_PRIO) {
488                 netdev_err(netdev,
489                            "%s, priority is out of range\n", __func__);
490                 return;
491         }
492
493         if (setting > 1)
494                 return;
495
496         cee_cfg->pfc_setting[priority] = setting;
497 }
498
499 static int
500 mlx5e_dcbnl_get_priority_pfc(struct net_device *netdev,
501                              int priority, u8 *setting)
502 {
503         struct ieee_pfc pfc;
504         int err;
505
506         err = mlx5e_dcbnl_ieee_getpfc(netdev, &pfc);
507
508         if (err)
509                 *setting = 0;
510         else
511                 *setting = (pfc.pfc_en >> priority) & 0x01;
512
513         return err;
514 }
515
516 static void mlx5e_dcbnl_getpfccfg(struct net_device *netdev,
517                                   int priority, u8 *setting)
518 {
519         if (priority >= CEE_DCBX_MAX_PRIO) {
520                 netdev_err(netdev,
521                            "%s, priority is out of range\n", __func__);
522                 return;
523         }
524
525         if (!setting)
526                 return;
527
528         mlx5e_dcbnl_get_priority_pfc(netdev, priority, setting);
529 }
530
531 static u8 mlx5e_dcbnl_getcap(struct net_device *netdev,
532                              int capid, u8 *cap)
533 {
534         struct mlx5e_priv *priv = netdev_priv(netdev);
535         struct mlx5_core_dev *mdev = priv->mdev;
536         u8 rval = 0;
537
538         switch (capid) {
539         case DCB_CAP_ATTR_PG:
540                 *cap = true;
541                 break;
542         case DCB_CAP_ATTR_PFC:
543                 *cap = true;
544                 break;
545         case DCB_CAP_ATTR_UP2TC:
546                 *cap = false;
547                 break;
548         case DCB_CAP_ATTR_PG_TCS:
549                 *cap = 1 << mlx5_max_tc(mdev);
550                 break;
551         case DCB_CAP_ATTR_PFC_TCS:
552                 *cap = 1 << mlx5_max_tc(mdev);
553                 break;
554         case DCB_CAP_ATTR_GSP:
555                 *cap = false;
556                 break;
557         case DCB_CAP_ATTR_BCN:
558                 *cap = false;
559                 break;
560         case DCB_CAP_ATTR_DCBX:
561                 *cap = (DCB_CAP_DCBX_LLD_MANAGED |
562                         DCB_CAP_DCBX_VER_CEE |
563                         DCB_CAP_DCBX_STATIC);
564                 break;
565         default:
566                 *cap = 0;
567                 rval = 1;
568                 break;
569         }
570
571         return rval;
572 }
573
574 static int mlx5e_dcbnl_getnumtcs(struct net_device *netdev,
575                                  int tcs_id, u8 *num)
576 {
577         struct mlx5e_priv *priv = netdev_priv(netdev);
578         struct mlx5_core_dev *mdev = priv->mdev;
579
580         switch (tcs_id) {
581         case DCB_NUMTCS_ATTR_PG:
582         case DCB_NUMTCS_ATTR_PFC:
583                 *num = mlx5_max_tc(mdev) + 1;
584                 break;
585         default:
586                 return -EINVAL;
587         }
588
589         return 0;
590 }
591
592 static u8 mlx5e_dcbnl_getpfcstate(struct net_device *netdev)
593 {
594         struct ieee_pfc pfc;
595
596         if (mlx5e_dcbnl_ieee_getpfc(netdev, &pfc))
597                 return MLX5E_CEE_STATE_DOWN;
598
599         return pfc.pfc_en ? MLX5E_CEE_STATE_UP : MLX5E_CEE_STATE_DOWN;
600 }
601
602 static void mlx5e_dcbnl_setpfcstate(struct net_device *netdev, u8 state)
603 {
604         struct mlx5e_priv *priv = netdev_priv(netdev);
605         struct mlx5e_cee_config *cee_cfg = &priv->dcbx.cee_cfg;
606
607         if ((state != MLX5E_CEE_STATE_UP) && (state != MLX5E_CEE_STATE_DOWN))
608                 return;
609
610         cee_cfg->pfc_enable = state;
611 }
612
613 const struct dcbnl_rtnl_ops mlx5e_dcbnl_ops = {
614         .ieee_getets    = mlx5e_dcbnl_ieee_getets,
615         .ieee_setets    = mlx5e_dcbnl_ieee_setets,
616         .ieee_getmaxrate = mlx5e_dcbnl_ieee_getmaxrate,
617         .ieee_setmaxrate = mlx5e_dcbnl_ieee_setmaxrate,
618         .ieee_getpfc    = mlx5e_dcbnl_ieee_getpfc,
619         .ieee_setpfc    = mlx5e_dcbnl_ieee_setpfc,
620         .getdcbx        = mlx5e_dcbnl_getdcbx,
621         .setdcbx        = mlx5e_dcbnl_setdcbx,
622
623 /* CEE interfaces */
624         .setall         = mlx5e_dcbnl_setall,
625         .getstate       = mlx5e_dcbnl_getstate,
626         .getpermhwaddr  = mlx5e_dcbnl_getpermhwaddr,
627
628         .setpgtccfgtx   = mlx5e_dcbnl_setpgtccfgtx,
629         .setpgbwgcfgtx  = mlx5e_dcbnl_setpgbwgcfgtx,
630         .getpgtccfgtx   = mlx5e_dcbnl_getpgtccfgtx,
631         .getpgbwgcfgtx  = mlx5e_dcbnl_getpgbwgcfgtx,
632
633         .setpfccfg      = mlx5e_dcbnl_setpfccfg,
634         .getpfccfg      = mlx5e_dcbnl_getpfccfg,
635         .getcap         = mlx5e_dcbnl_getcap,
636         .getnumtcs      = mlx5e_dcbnl_getnumtcs,
637         .getpfcstate    = mlx5e_dcbnl_getpfcstate,
638         .setpfcstate    = mlx5e_dcbnl_setpfcstate,
639 };