Release 4.15 drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
  
  
  
/*
 * Copyright (c) 2016, Mellanox Technologies. All rights reserved.
 *
 * This software is available to you under a choice of one of two
 * licenses.  You may choose to be licensed under the terms of the GNU
 * General Public License (GPL) Version 2, available from the file
 * COPYING in the main directory of this source tree, or the
 * OpenIB.org BSD license below:
 *
 *     Redistribution and use in source and binary forms, with or
 *     without modification, are permitted provided that the following
 *     conditions are met:
 *
 *      - Redistributions of source code must retain the above
 *        copyright notice, this list of conditions and the following
 *        disclaimer.
 *
 *      - Redistributions in binary form must reproduce the above
 *        copyright notice, this list of conditions and the following
 *        disclaimer in the documentation and/or other materials
 *        provided with the distribution.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */
#include <linux/device.h>
#include <linux/netdevice.h>
#include "en.h"
#define MLX5E_MAX_PRIORITY 8
#define MLX5E_100MB (100000)
#define MLX5E_1GB   (1000000)
#define MLX5E_CEE_STATE_UP    1
#define MLX5E_CEE_STATE_DOWN  0
enum {
	
MLX5E_VENDOR_TC_GROUP_NUM = 7,
	
MLX5E_LOWEST_PRIO_GROUP   = 0,
};
#define MLX5_DSCP_SUPPORTED(mdev) (MLX5_CAP_GEN(mdev, qcam_reg)  && \
                                   MLX5_CAP_QCAM_REG(mdev, qpts) && \
                                   MLX5_CAP_QCAM_REG(mdev, qpdpm))
static int mlx5e_set_trust_state(struct mlx5e_priv *priv, u8 trust_state);
static int mlx5e_set_dscp2prio(struct mlx5e_priv *priv, u8 dscp, u8 prio);
/* If dcbx mode is non-host set the dcbx mode to host.
 */
static int mlx5e_dcbnl_set_dcbx_mode(struct mlx5e_priv *priv,
				     enum mlx5_dcbx_oper_mode mode)
{
	struct mlx5_core_dev *mdev = priv->mdev;
	u32 param[MLX5_ST_SZ_DW(dcbx_param)];
	int err;
	err = mlx5_query_port_dcbx_param(mdev, param);
	if (err)
		return err;
	MLX5_SET(dcbx_param, param, version_admin, mode);
	if (mode != MLX5E_DCBX_PARAM_VER_OPER_HOST)
		MLX5_SET(dcbx_param, param, willing_admin, 1);
	return mlx5_set_port_dcbx_param(mdev, param);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 88 | 100.00% | 1 | 100.00% | 
| Total | 88 | 100.00% | 1 | 100.00% | 
static int mlx5e_dcbnl_switch_to_host_mode(struct mlx5e_priv *priv)
{
	struct mlx5e_dcbx *dcbx = &priv->dcbx;
	int err;
	if (!MLX5_CAP_GEN(priv->mdev, dcbx))
		return 0;
	if (dcbx->mode == MLX5E_DCBX_PARAM_VER_OPER_HOST)
		return 0;
	err = mlx5e_dcbnl_set_dcbx_mode(priv, MLX5E_DCBX_PARAM_VER_OPER_HOST);
	if (err)
		return err;
	dcbx->mode = MLX5E_DCBX_PARAM_VER_OPER_HOST;
	return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 75 | 100.00% | 1 | 100.00% | 
| Total | 75 | 100.00% | 1 | 100.00% | 
static int mlx5e_dcbnl_ieee_getets(struct net_device *netdev,
				   struct ieee_ets *ets)
{
	struct mlx5e_priv *priv = netdev_priv(netdev);
	struct mlx5_core_dev *mdev = priv->mdev;
	u8 tc_group[IEEE_8021QAZ_MAX_TCS];
	bool is_tc_group_6_exist = false;
	bool is_zero_bw_ets_tc = false;
	int err = 0;
	int i;
	if (!MLX5_CAP_GEN(priv->mdev, ets))
		return -EOPNOTSUPP;
	ets->ets_cap = mlx5_max_tc(priv->mdev) + 1;
	for (i = 0; i < ets->ets_cap; i++) {
		err = mlx5_query_port_prio_tc(mdev, i, &ets->prio_tc[i]);
		if (err)
			return err;
		err = mlx5_query_port_tc_group(mdev, i, &tc_group[i]);
		if (err)
			return err;
		err = mlx5_query_port_tc_bw_alloc(mdev, i, &ets->tc_tx_bw[i]);
		if (err)
			return err;
		if (ets->tc_tx_bw[i] < MLX5E_MAX_BW_ALLOC &&
		    tc_group[i] == (MLX5E_LOWEST_PRIO_GROUP + 1))
			is_zero_bw_ets_tc = true;
		if (tc_group[i] == (MLX5E_VENDOR_TC_GROUP_NUM - 1))
			is_tc_group_6_exist = true;
	}
	/* Report 0% ets tc if exits*/
	if (is_zero_bw_ets_tc) {
		for (i = 0; i < ets->ets_cap; i++)
			if (tc_group[i] == MLX5E_LOWEST_PRIO_GROUP)
				ets->tc_tx_bw[i] = 0;
	}
	/* Update tc_tsa based on fw setting*/
	for (i = 0; i < ets->ets_cap; i++) {
		if (ets->tc_tx_bw[i] < MLX5E_MAX_BW_ALLOC)
			priv->dcbx.tc_tsa[i] = IEEE_8021QAZ_TSA_ETS;
		else if (tc_group[i] == MLX5E_VENDOR_TC_GROUP_NUM &&
			 !is_tc_group_6_exist)
			priv->dcbx.tc_tsa[i] = IEEE_8021QAZ_TSA_VENDOR;
	}
	memcpy(ets->tc_tsa, priv->dcbx.tc_tsa, sizeof(ets->tc_tsa));
	return err;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 286 | 82.90% | 2 | 50.00% | 
| Saeed Mahameed | 58 | 16.81% | 1 | 25.00% | 
| Or Gerlitz | 1 | 0.29% | 1 | 25.00% | 
| Total | 345 | 100.00% | 4 | 100.00% | 
static void mlx5e_build_tc_group(struct ieee_ets *ets, u8 *tc_group, int max_tc)
{
	bool any_tc_mapped_to_ets = false;
	bool ets_zero_bw = false;
	int strict_group;
	int i;
	for (i = 0; i <= max_tc; i++) {
		if (ets->tc_tsa[i] == IEEE_8021QAZ_TSA_ETS) {
			any_tc_mapped_to_ets = true;
			if (!ets->tc_tx_bw[i])
				ets_zero_bw = true;
		}
	}
	/* strict group has higher priority than ets group */
	strict_group = MLX5E_LOWEST_PRIO_GROUP;
	if (any_tc_mapped_to_ets)
		strict_group++;
	if (ets_zero_bw)
		strict_group++;
	for (i = 0; i <= max_tc; i++) {
		switch (ets->tc_tsa[i]) {
		case IEEE_8021QAZ_TSA_VENDOR:
			tc_group[i] = MLX5E_VENDOR_TC_GROUP_NUM;
			break;
		case IEEE_8021QAZ_TSA_STRICT:
			tc_group[i] = strict_group++;
			break;
		case IEEE_8021QAZ_TSA_ETS:
			tc_group[i] = MLX5E_LOWEST_PRIO_GROUP;
			if (ets->tc_tx_bw[i] && ets_zero_bw)
				tc_group[i] = MLX5E_LOWEST_PRIO_GROUP + 1;
			break;
		}
	}
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Saeed Mahameed | 120 | 67.04% | 1 | 50.00% | 
| Huy Nguyen | 59 | 32.96% | 1 | 50.00% | 
| Total | 179 | 100.00% | 2 | 100.00% | 
static void mlx5e_build_tc_tx_bw(struct ieee_ets *ets, u8 *tc_tx_bw,
				 u8 *tc_group, int max_tc)
{
	int bw_for_ets_zero_bw_tc = 0;
	int last_ets_zero_bw_tc = -1;
	int num_ets_zero_bw = 0;
	int i;
	for (i = 0; i <= max_tc; i++) {
		if (ets->tc_tsa[i] == IEEE_8021QAZ_TSA_ETS &&
		    !ets->tc_tx_bw[i]) {
			num_ets_zero_bw++;
			last_ets_zero_bw_tc = i;
		}
	}
	if (num_ets_zero_bw)
		bw_for_ets_zero_bw_tc = MLX5E_MAX_BW_ALLOC / num_ets_zero_bw;
	for (i = 0; i <= max_tc; i++) {
		switch (ets->tc_tsa[i]) {
		case IEEE_8021QAZ_TSA_VENDOR:
			tc_tx_bw[i] = MLX5E_MAX_BW_ALLOC;
			break;
		case IEEE_8021QAZ_TSA_STRICT:
			tc_tx_bw[i] = MLX5E_MAX_BW_ALLOC;
			break;
		case IEEE_8021QAZ_TSA_ETS:
			tc_tx_bw[i] = ets->tc_tx_bw[i] ?
				      ets->tc_tx_bw[i] :
				      bw_for_ets_zero_bw_tc;
			break;
		}
	}
	/* Make sure the total bw for ets zero bw group is 100% */
	if (last_ets_zero_bw_tc != -1)
		tc_tx_bw[last_ets_zero_bw_tc] +=
			MLX5E_MAX_BW_ALLOC % num_ets_zero_bw;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 95 | 51.63% | 1 | 50.00% | 
| Saeed Mahameed | 89 | 48.37% | 1 | 50.00% | 
| Total | 184 | 100.00% | 2 | 100.00% | 
/* If there are ETS BW 0,
 *   Set ETS group # to 1 for all ETS non zero BW tcs. Their sum must be 100%.
 *   Set group #0 to all the ETS BW 0 tcs and
 *     equally splits the 100% BW between them
 *   Report both group #0 and #1 as ETS type.
 *     All the tcs in group #0 will be reported with 0% BW.
 */
int mlx5e_dcbnl_ieee_setets_core(struct mlx5e_priv *priv, struct ieee_ets *ets)
{
	struct mlx5_core_dev *mdev = priv->mdev;
	u8 tc_tx_bw[IEEE_8021QAZ_MAX_TCS];
	u8 tc_group[IEEE_8021QAZ_MAX_TCS];
	int max_tc = mlx5_max_tc(mdev);
	int err, i;
	mlx5e_build_tc_group(ets, tc_group, max_tc);
	mlx5e_build_tc_tx_bw(ets, tc_tx_bw, tc_group, max_tc);
	err = mlx5_set_port_prio_tc(mdev, ets->prio_tc);
	if (err)
		return err;
	err = mlx5_set_port_tc_group(mdev, tc_group);
	if (err)
		return err;
	err = mlx5_set_port_tc_bw_alloc(mdev, tc_tx_bw);
	if (err)
		return err;
	memcpy(priv->dcbx.tc_tsa, ets->tc_tsa, sizeof(ets->tc_tsa));
	for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
		mlx5e_dbg(HW, priv, "%s: prio_%d <=> tc_%d\n",
			  __func__, i, ets->prio_tc[i]);
		mlx5e_dbg(HW, priv, "%s: tc_%d <=> tx_bw_%d%%, group_%d\n",
			  __func__, i, tc_tx_bw[i], tc_group[i]);
	}
	return err;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Saeed Mahameed | 108 | 54.00% | 1 | 33.33% | 
| Inbar Karmy | 60 | 30.00% | 1 | 33.33% | 
| Huy Nguyen | 32 | 16.00% | 1 | 33.33% | 
| Total | 200 | 100.00% | 3 | 100.00% | 
static int mlx5e_dbcnl_validate_ets(struct net_device *netdev,
				    struct ieee_ets *ets)
{
	bool have_ets_tc = false;
	int bw_sum = 0;
	int i;
	/* Validate Priority */
	for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
		if (ets->prio_tc[i] >= MLX5E_MAX_PRIORITY) {
			netdev_err(netdev,
				   "Failed to validate ETS: priority value greater than max(%d)\n",
				    MLX5E_MAX_PRIORITY);
			return -EINVAL;
		}
	}
	/* Validate Bandwidth Sum */
	for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
		if (ets->tc_tsa[i] == IEEE_8021QAZ_TSA_ETS) {
			have_ets_tc = true;
			bw_sum += ets->tc_tx_bw[i];
		}
	}
	if (have_ets_tc && bw_sum != 100) {
		netdev_err(netdev,
			   "Failed to validate ETS: BW sum is illegal\n");
		return -EINVAL;
	}
	return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Saeed Mahameed | 98 | 71.53% | 1 | 33.33% | 
| Eran Ben Elisha | 25 | 18.25% | 1 | 33.33% | 
| Huy Nguyen | 14 | 10.22% | 1 | 33.33% | 
| Total | 137 | 100.00% | 3 | 100.00% | 
static int mlx5e_dcbnl_ieee_setets(struct net_device *netdev,
				   struct ieee_ets *ets)
{
	struct mlx5e_priv *priv = netdev_priv(netdev);
	int err;
	if (!MLX5_CAP_GEN(priv->mdev, ets))
		return -EOPNOTSUPP;
	err = mlx5e_dbcnl_validate_ets(netdev, ets);
	if (err)
		return err;
	err = mlx5e_dcbnl_ieee_setets_core(priv, ets);
	if (err)
		return err;
	return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Saeed Mahameed | 62 | 77.50% | 1 | 25.00% | 
| Huy Nguyen | 15 | 18.75% | 1 | 25.00% | 
| Eran Ben Elisha | 2 | 2.50% | 1 | 25.00% | 
| Or Gerlitz | 1 | 1.25% | 1 | 25.00% | 
| Total | 80 | 100.00% | 4 | 100.00% | 
static int mlx5e_dcbnl_ieee_getpfc(struct net_device *dev,
				   struct ieee_pfc *pfc)
{
	struct mlx5e_priv *priv = netdev_priv(dev);
	struct mlx5_core_dev *mdev = priv->mdev;
	struct mlx5e_pport_stats *pstats = &priv->stats.pport;
	int i;
	pfc->pfc_cap = mlx5_max_tc(mdev) + 1;
	for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
		pfc->requests[i]    = PPORT_PER_PRIO_GET(pstats, i, tx_pause);
		pfc->indications[i] = PPORT_PER_PRIO_GET(pstats, i, rx_pause);
	}
	return mlx5_query_port_pfc(mdev, &pfc->pfc_en, NULL);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Gal Pressman | 62 | 51.24% | 1 | 50.00% | 
| Achiad Shochat | 59 | 48.76% | 1 | 50.00% | 
| Total | 121 | 100.00% | 2 | 100.00% | 
static int mlx5e_dcbnl_ieee_setpfc(struct net_device *dev,
				   struct ieee_pfc *pfc)
{
	struct mlx5e_priv *priv = netdev_priv(dev);
	struct mlx5_core_dev *mdev = priv->mdev;
	u8 curr_pfc_en;
	int ret;
	mlx5_query_port_pfc(mdev, &curr_pfc_en, NULL);
	if (pfc->pfc_en == curr_pfc_en)
		return 0;
	ret = mlx5_set_port_pfc(mdev, pfc->pfc_en, pfc->pfc_en);
	mlx5_toggle_port_link(mdev);
	if (!ret) {
		mlx5e_dbg(HW, priv,
			  "%s: PFC per priority bit mask: 0x%x\n",
			  __func__, pfc->pfc_en);
	}
	return ret;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Achiad Shochat | 84 | 78.50% | 1 | 33.33% | 
| Inbar Karmy | 22 | 20.56% | 1 | 33.33% | 
| Gal Pressman | 1 | 0.93% | 1 | 33.33% | 
| Total | 107 | 100.00% | 3 | 100.00% | 
static u8 mlx5e_dcbnl_getdcbx(struct net_device *dev)
{
	struct mlx5e_priv *priv = netdev_priv(dev);
	return priv->dcbx.cap;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 16 | 57.14% | 2 | 66.67% | 
| Saeed Mahameed | 12 | 42.86% | 1 | 33.33% | 
| Total | 28 | 100.00% | 3 | 100.00% | 
static u8 mlx5e_dcbnl_setdcbx(struct net_device *dev, u8 mode)
{
	struct mlx5e_priv *priv = netdev_priv(dev);
	struct mlx5e_dcbx *dcbx = &priv->dcbx;
	if (mode & DCB_CAP_DCBX_LLD_MANAGED)
		return 1;
	if ((!mode) && MLX5_CAP_GEN(priv->mdev, dcbx)) {
		if (dcbx->mode == MLX5E_DCBX_PARAM_VER_OPER_AUTO)
			return 0;
		/* set dcbx to fw controlled */
		if (!mlx5e_dcbnl_set_dcbx_mode(priv, MLX5E_DCBX_PARAM_VER_OPER_AUTO)) {
			dcbx->mode = MLX5E_DCBX_PARAM_VER_OPER_AUTO;
			dcbx->cap &= ~DCB_CAP_DCBX_HOST;
			return 0;
		}
		return 1;
	}
	if (!(mode & DCB_CAP_DCBX_HOST))
		return 1;
	if (mlx5e_dcbnl_switch_to_host_mode(netdev_priv(dev)))
		return 1;
	dcbx->cap = mode;
	return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 119 | 86.23% | 4 | 80.00% | 
| Saeed Mahameed | 19 | 13.77% | 1 | 20.00% | 
| Total | 138 | 100.00% | 5 | 100.00% | 
static int mlx5e_dcbnl_ieee_setapp(struct net_device *dev, struct dcb_app *app)
{
	struct mlx5e_priv *priv = netdev_priv(dev);
	struct dcb_app temp;
	bool is_new;
	int err;
	if (app->selector != IEEE_8021QAZ_APP_SEL_DSCP)
		return -EINVAL;
	if (!MLX5_CAP_GEN(priv->mdev, vport_group_manager))
		return -EINVAL;
	if (!MLX5_DSCP_SUPPORTED(priv->mdev))
		return -EINVAL;
	if (app->protocol >= MLX5E_MAX_DSCP)
		return -EINVAL;
	/* Save the old entry info */
	temp.selector = IEEE_8021QAZ_APP_SEL_DSCP;
	temp.protocol = app->protocol;
	temp.priority = priv->dcbx_dp.dscp2prio[app->protocol];
	/* Check if need to switch to dscp trust state */
	if (!priv->dcbx.dscp_app_cnt) {
		err =  mlx5e_set_trust_state(priv, MLX5_QPTS_TRUST_DSCP);
		if (err)
			return err;
	}
	/* Skip the fw command if new and old mapping are the same */
	if (app->priority != priv->dcbx_dp.dscp2prio[app->protocol]) {
		err = mlx5e_set_dscp2prio(priv, app->protocol, app->priority);
		if (err)
			goto fw_err;
	}
	/* Delete the old entry if exists */
	is_new = false;
	err = dcb_ieee_delapp(dev, &temp);
	if (err)
		is_new = true;
	/* Add new entry and update counter */
	err = dcb_ieee_setapp(dev, app);
	if (err)
		return err;
	if (is_new)
		priv->dcbx.dscp_app_cnt++;
	return err;
fw_err:
	mlx5e_set_trust_state(priv, MLX5_QPTS_TRUST_PCP);
	return err;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 195 | 76.17% | 1 | 50.00% | 
| Tariq Toukan | 61 | 23.83% | 1 | 50.00% | 
| Total | 256 | 100.00% | 2 | 100.00% | 
static int mlx5e_dcbnl_ieee_delapp(struct net_device *dev, struct dcb_app *app)
{
	struct mlx5e_priv *priv = netdev_priv(dev);
	int err;
	if (app->selector != IEEE_8021QAZ_APP_SEL_DSCP)
		return -EINVAL;
	if (!MLX5_CAP_GEN(priv->mdev, vport_group_manager))
		return -EINVAL;
	if (!MLX5_DSCP_SUPPORTED(priv->mdev))
		return -EINVAL;
	if (app->protocol >= MLX5E_MAX_DSCP)
		return -EINVAL;
	/* Skip if no dscp app entry */
	if (!priv->dcbx.dscp_app_cnt)
		return -ENOENT;
	/* Check if the entry matches fw setting */
	if (app->priority != priv->dcbx_dp.dscp2prio[app->protocol])
		return -ENOENT;
	/* Delete the app entry */
	err = dcb_ieee_delapp(dev, app);
	if (err)
		return err;
	/* Reset the priority mapping back to zero */
	err = mlx5e_set_dscp2prio(priv, app->protocol, 0);
	if (err)
		goto fw_err;
	priv->dcbx.dscp_app_cnt--;
	/* Check if need to switch to pcp trust state */
	if (!priv->dcbx.dscp_app_cnt)
		err = mlx5e_set_trust_state(priv, MLX5_QPTS_TRUST_PCP);
	return err;
fw_err:
	mlx5e_set_trust_state(priv, MLX5_QPTS_TRUST_PCP);
	return err;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 196 | 98.99% | 1 | 50.00% | 
| Tariq Toukan | 2 | 1.01% | 1 | 50.00% | 
| Total | 198 | 100.00% | 2 | 100.00% | 
static int mlx5e_dcbnl_ieee_getmaxrate(struct net_device *netdev,
				       struct ieee_maxrate *maxrate)
{
	struct mlx5e_priv *priv    = netdev_priv(netdev);
	struct mlx5_core_dev *mdev = priv->mdev;
	u8 max_bw_value[IEEE_8021QAZ_MAX_TCS];
	u8 max_bw_unit[IEEE_8021QAZ_MAX_TCS];
	int err;
	int i;
	err = mlx5_query_port_ets_rate_limit(mdev, max_bw_value, max_bw_unit);
	if (err)
		return err;
	memset(maxrate->tc_maxrate, 0, sizeof(maxrate->tc_maxrate));
	for (i = 0; i <= mlx5_max_tc(mdev); i++) {
		switch (max_bw_unit[i]) {
		case MLX5_100_MBPS_UNIT:
			maxrate->tc_maxrate[i] = max_bw_value[i] * MLX5E_100MB;
			break;
		case MLX5_GBPS_UNIT:
			maxrate->tc_maxrate[i] = max_bw_value[i] * MLX5E_1GB;
			break;
		case MLX5_BW_NO_LIMIT:
			break;
		default:
			WARN(true, "non-supported BW unit");
			break;
		}
	}
	return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Tariq Toukan | 91 | 54.82% | 1 | 50.00% | 
| Huy Nguyen | 75 | 45.18% | 1 | 50.00% | 
| Total | 166 | 100.00% | 2 | 100.00% | 
static int mlx5e_dcbnl_ieee_setmaxrate(struct net_device *netdev,
				       struct ieee_maxrate *maxrate)
{
	struct mlx5e_priv *priv    = netdev_priv(netdev);
	struct mlx5_core_dev *mdev = priv->mdev;
	u8 max_bw_value[IEEE_8021QAZ_MAX_TCS];
	u8 max_bw_unit[IEEE_8021QAZ_MAX_TCS];
	__u64 upper_limit_mbps = roundup(255 * MLX5E_100MB, MLX5E_1GB);
	int i;
	memset(max_bw_value, 0, sizeof(max_bw_value));
	memset(max_bw_unit, 0, sizeof(max_bw_unit));
	for (i = 0; i <= mlx5_max_tc(mdev); i++) {
		if (!maxrate->tc_maxrate[i]) {
			max_bw_unit[i]  = MLX5_BW_NO_LIMIT;
			continue;
		}
		if (maxrate->tc_maxrate[i] < upper_limit_mbps) {
			max_bw_value[i] = div_u64(maxrate->tc_maxrate[i],
						  MLX5E_100MB);
			max_bw_value[i] = max_bw_value[i] ? max_bw_value[i] : 1;
			max_bw_unit[i]  = MLX5_100_MBPS_UNIT;
		} else {
			max_bw_value[i] = div_u64(maxrate->tc_maxrate[i],
						  MLX5E_1GB);
			max_bw_unit[i]  = MLX5_GBPS_UNIT;
		}
	}
	for (i = 0; i < IEEE_8021QAZ_MAX_TCS; i++) {
		mlx5e_dbg(HW, priv, "%s: tc_%d <=> max_bw %d Gbps\n",
			  __func__, i, max_bw_value[i]);
	}
	return mlx5_modify_port_ets_rate_limit(mdev, max_bw_value, max_bw_unit);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 134 | 54.03% | 1 | 33.33% | 
| Tariq Toukan | 81 | 32.66% | 1 | 33.33% | 
| Inbar Karmy | 33 | 13.31% | 1 | 33.33% | 
| Total | 248 | 100.00% | 3 | 100.00% | 
static u8 mlx5e_dcbnl_setall(struct net_device *netdev)
{
	struct mlx5e_priv *priv = netdev_priv(netdev);
	struct mlx5e_cee_config *cee_cfg = &priv->dcbx.cee_cfg;
	struct mlx5_core_dev *mdev = priv->mdev;
	struct ieee_ets ets;
	struct ieee_pfc pfc;
	int err = -EOPNOTSUPP;
	int i;
	if (!MLX5_CAP_GEN(mdev, ets))
		goto out;
	memset(&ets, 0, sizeof(ets));
	memset(&pfc, 0, sizeof(pfc));
	ets.ets_cap = IEEE_8021QAZ_MAX_TCS;
	for (i = 0; i < CEE_DCBX_MAX_PGS; i++) {
		ets.tc_tx_bw[i] = cee_cfg->pg_bw_pct[i];
		ets.tc_rx_bw[i] = cee_cfg->pg_bw_pct[i];
		ets.tc_tsa[i]   = IEEE_8021QAZ_TSA_ETS;
		ets.prio_tc[i]  = cee_cfg->prio_to_pg_map[i];
		mlx5e_dbg(HW, priv,
			  "%s: Priority group %d: tx_bw %d, rx_bw %d, prio_tc %d\n",
			  __func__, i, ets.tc_tx_bw[i], ets.tc_rx_bw[i],
			  ets.prio_tc[i]);
	}
	err = mlx5e_dbcnl_validate_ets(netdev, &ets);
	if (err) {
		netdev_err(netdev,
			   "%s, Failed to validate ETS: %d\n", __func__, err);
		goto out;
	}
	err = mlx5e_dcbnl_ieee_setets_core(priv, &ets);
	if (err) {
		netdev_err(netdev,
			   "%s, Failed to set ETS: %d\n", __func__, err);
		goto out;
	}
	/* Set PFC */
	pfc.pfc_cap = mlx5_max_tc(mdev) + 1;
	if (!cee_cfg->pfc_enable)
		pfc.pfc_en = 0;
	else
		for (i = 0; i < CEE_DCBX_MAX_PRIO; i++)
			pfc.pfc_en |= cee_cfg->pfc_setting[i] << i;
	err = mlx5e_dcbnl_ieee_setpfc(netdev, &pfc);
	if (err) {
		netdev_err(netdev,
			   "%s, Failed to set PFC: %d\n", __func__, err);
		goto out;
	}
out:
	return err ? MLX5_DCB_NO_CHG : MLX5_DCB_CHG_RESET;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 303 | 85.35% | 2 | 28.57% | 
| Inbar Karmy | 34 | 9.58% | 1 | 14.29% | 
| Saeed Mahameed | 9 | 2.54% | 1 | 14.29% | 
| Achiad Shochat | 4 | 1.13% | 1 | 14.29% | 
| Tariq Toukan | 4 | 1.13% | 1 | 14.29% | 
| Or Gerlitz | 1 | 0.28% | 1 | 14.29% | 
| Total | 355 | 100.00% | 7 | 100.00% | 
static u8 mlx5e_dcbnl_getstate(struct net_device *netdev)
{
	return MLX5E_CEE_STATE_UP;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 14 | 100.00% | 1 | 100.00% | 
| Total | 14 | 100.00% | 1 | 100.00% | 
static void mlx5e_dcbnl_getpermhwaddr(struct net_device *netdev,
				      u8 *perm_addr)
{
	struct mlx5e_priv *priv = netdev_priv(netdev);
	if (!perm_addr)
		return;
	memset(perm_addr, 0xff, MAX_ADDR_LEN);
	mlx5_query_nic_vport_mac_address(priv->mdev, 0, perm_addr);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 51 | 100.00% | 2 | 100.00% | 
| Total | 51 | 100.00% | 2 | 100.00% | 
static void mlx5e_dcbnl_setpgtccfgtx(struct net_device *netdev,
				     int priority, u8 prio_type,
				     u8 pgid, u8 bw_pct, u8 up_map)
{
	struct mlx5e_priv *priv = netdev_priv(netdev);
	struct mlx5e_cee_config *cee_cfg = &priv->dcbx.cee_cfg;
	if (priority >= CEE_DCBX_MAX_PRIO) {
		netdev_err(netdev,
			   "%s, priority is out of range\n", __func__);
		return;
	}
	if (pgid >= CEE_DCBX_MAX_PGS) {
		netdev_err(netdev,
			   "%s, priority group is out of range\n", __func__);
		return;
	}
	cee_cfg->prio_to_pg_map[priority] = pgid;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 93 | 100.00% | 1 | 100.00% | 
| Total | 93 | 100.00% | 1 | 100.00% | 
static void mlx5e_dcbnl_setpgbwgcfgtx(struct net_device *netdev,
				      int pgid, u8 bw_pct)
{
	struct mlx5e_priv *priv = netdev_priv(netdev);
	struct mlx5e_cee_config *cee_cfg = &priv->dcbx.cee_cfg;
	if (pgid >= CEE_DCBX_MAX_PGS) {
		netdev_err(netdev,
			   "%s, priority group is out of range\n", __func__);
		return;
	}
	cee_cfg->pg_bw_pct[pgid] = bw_pct;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 66 | 100.00% | 1 | 100.00% | 
| Total | 66 | 100.00% | 1 | 100.00% | 
static void mlx5e_dcbnl_getpgtccfgtx(struct net_device *netdev,
				     int priority, u8 *prio_type,
				     u8 *pgid, u8 *bw_pct, u8 *up_map)
{
	struct mlx5e_priv *priv = netdev_priv(netdev);
	struct mlx5_core_dev *mdev = priv->mdev;
	if (!MLX5_CAP_GEN(priv->mdev, ets)) {
		netdev_err(netdev, "%s, ets is not supported\n", __func__);
		return;
	}
	if (priority >= CEE_DCBX_MAX_PRIO) {
		netdev_err(netdev,
			   "%s, priority is out of range\n", __func__);
		return;
	}
	*prio_type = 0;
	*bw_pct = 0;
	*up_map = 0;
	if (mlx5_query_port_prio_tc(mdev, priority, pgid))
		*pgid = 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 98 | 80.33% | 1 | 50.00% | 
| Moshe Shemesh | 24 | 19.67% | 1 | 50.00% | 
| Total | 122 | 100.00% | 2 | 100.00% | 
static void mlx5e_dcbnl_getpgbwgcfgtx(struct net_device *netdev,
				      int pgid, u8 *bw_pct)
{
	struct ieee_ets ets;
	if (pgid >= CEE_DCBX_MAX_PGS) {
		netdev_err(netdev,
			   "%s, priority group is out of range\n", __func__);
		return;
	}
	mlx5e_dcbnl_ieee_getets(netdev, &ets);
	*bw_pct = ets.tc_tx_bw[pgid];
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 58 | 100.00% | 2 | 100.00% | 
| Total | 58 | 100.00% | 2 | 100.00% | 
static void mlx5e_dcbnl_setpfccfg(struct net_device *netdev,
				  int priority, u8 setting)
{
	struct mlx5e_priv *priv = netdev_priv(netdev);
	struct mlx5e_cee_config *cee_cfg = &priv->dcbx.cee_cfg;
	if (priority >= CEE_DCBX_MAX_PRIO) {
		netdev_err(netdev,
			   "%s, priority is out of range\n", __func__);
		return;
	}
	if (setting > 1)
		return;
	cee_cfg->pfc_setting[priority] = setting;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 73 | 100.00% | 1 | 100.00% | 
| Total | 73 | 100.00% | 1 | 100.00% | 
static int
mlx5e_dcbnl_get_priority_pfc(struct net_device *netdev,
			     int priority, u8 *setting)
{
	struct ieee_pfc pfc;
	int err;
	err = mlx5e_dcbnl_ieee_getpfc(netdev, &pfc);
	if (err)
		*setting = 0;
	else
		*setting = (pfc.pfc_en >> priority) & 0x01;
	return err;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 61 | 100.00% | 1 | 100.00% | 
| Total | 61 | 100.00% | 1 | 100.00% | 
static void mlx5e_dcbnl_getpfccfg(struct net_device *netdev,
				  int priority, u8 *setting)
{
	if (priority >= CEE_DCBX_MAX_PRIO) {
		netdev_err(netdev,
			   "%s, priority is out of range\n", __func__);
		return;
	}
	if (!setting)
		return;
	mlx5e_dcbnl_get_priority_pfc(netdev, priority, setting);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 51 | 100.00% | 1 | 100.00% | 
| Total | 51 | 100.00% | 1 | 100.00% | 
static u8 mlx5e_dcbnl_getcap(struct net_device *netdev,
			     int capid, u8 *cap)
{
	struct mlx5e_priv *priv = netdev_priv(netdev);
	struct mlx5_core_dev *mdev = priv->mdev;
	u8 rval = 0;
	switch (capid) {
	case DCB_CAP_ATTR_PG:
		*cap = true;
		break;
	case DCB_CAP_ATTR_PFC:
		*cap = true;
		break;
	case DCB_CAP_ATTR_UP2TC:
		*cap = false;
		break;
	case DCB_CAP_ATTR_PG_TCS:
		*cap = 1 << mlx5_max_tc(mdev);
		break;
	case DCB_CAP_ATTR_PFC_TCS:
		*cap = 1 << mlx5_max_tc(mdev);
		break;
	case DCB_CAP_ATTR_GSP:
		*cap = false;
		break;
	case DCB_CAP_ATTR_BCN:
		*cap = false;
		break;
	case DCB_CAP_ATTR_DCBX:
		*cap = priv->dcbx.cap |
		       DCB_CAP_DCBX_VER_CEE |
		       DCB_CAP_DCBX_VER_IEEE;
		break;
	default:
		*cap = 0;
		rval = 1;
		break;
	}
	return rval;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 152 | 100.00% | 2 | 100.00% | 
| Total | 152 | 100.00% | 2 | 100.00% | 
static int mlx5e_dcbnl_getnumtcs(struct net_device *netdev,
				 int tcs_id, u8 *num)
{
	struct mlx5e_priv *priv = netdev_priv(netdev);
	struct mlx5_core_dev *mdev = priv->mdev;
	switch (tcs_id) {
	case DCB_NUMTCS_ATTR_PG:
	case DCB_NUMTCS_ATTR_PFC:
		*num = mlx5_max_tc(mdev) + 1;
		break;
	default:
		return -EINVAL;
	}
	return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 68 | 100.00% | 1 | 100.00% | 
| Total | 68 | 100.00% | 1 | 100.00% | 
static u8 mlx5e_dcbnl_getpfcstate(struct net_device *netdev)
{
	struct ieee_pfc pfc;
	if (mlx5e_dcbnl_ieee_getpfc(netdev, &pfc))
		return MLX5E_CEE_STATE_DOWN;
	return pfc.pfc_en ? MLX5E_CEE_STATE_UP : MLX5E_CEE_STATE_DOWN;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 37 | 100.00% | 1 | 100.00% | 
| Total | 37 | 100.00% | 1 | 100.00% | 
static void mlx5e_dcbnl_setpfcstate(struct net_device *netdev, u8 state)
{
	struct mlx5e_priv *priv = netdev_priv(netdev);
	struct mlx5e_cee_config *cee_cfg = &priv->dcbx.cee_cfg;
	if ((state != MLX5E_CEE_STATE_UP) && (state != MLX5E_CEE_STATE_DOWN))
		return;
	cee_cfg->pfc_enable = state;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 57 | 100.00% | 1 | 100.00% | 
| Total | 57 | 100.00% | 1 | 100.00% | 
const struct dcbnl_rtnl_ops mlx5e_dcbnl_ops = {
	.ieee_getets	= mlx5e_dcbnl_ieee_getets,
	.ieee_setets	= mlx5e_dcbnl_ieee_setets,
	.ieee_getmaxrate = mlx5e_dcbnl_ieee_getmaxrate,
	.ieee_setmaxrate = mlx5e_dcbnl_ieee_setmaxrate,
	.ieee_getpfc	= mlx5e_dcbnl_ieee_getpfc,
	.ieee_setpfc	= mlx5e_dcbnl_ieee_setpfc,
	.ieee_setapp    = mlx5e_dcbnl_ieee_setapp,
	.ieee_delapp    = mlx5e_dcbnl_ieee_delapp,
	.getdcbx	= mlx5e_dcbnl_getdcbx,
	.setdcbx	= mlx5e_dcbnl_setdcbx,
/* CEE interfaces */
	.setall         = mlx5e_dcbnl_setall,
	.getstate       = mlx5e_dcbnl_getstate,
	.getpermhwaddr  = mlx5e_dcbnl_getpermhwaddr,
	.setpgtccfgtx   = mlx5e_dcbnl_setpgtccfgtx,
	.setpgbwgcfgtx  = mlx5e_dcbnl_setpgbwgcfgtx,
	.getpgtccfgtx   = mlx5e_dcbnl_getpgtccfgtx,
	.getpgbwgcfgtx  = mlx5e_dcbnl_getpgbwgcfgtx,
	.setpfccfg      = mlx5e_dcbnl_setpfccfg,
	.getpfccfg      = mlx5e_dcbnl_getpfccfg,
	.getcap         = mlx5e_dcbnl_getcap,
	.getnumtcs      = mlx5e_dcbnl_getnumtcs,
	.getpfcstate    = mlx5e_dcbnl_getpfcstate,
	.setpfcstate    = mlx5e_dcbnl_setpfcstate,
};
static void mlx5e_dcbnl_query_dcbx_mode(struct mlx5e_priv *priv,
					enum mlx5_dcbx_oper_mode *mode)
{
	u32 out[MLX5_ST_SZ_DW(dcbx_param)];
	*mode = MLX5E_DCBX_PARAM_VER_OPER_HOST;
	if (!mlx5_query_port_dcbx_param(priv->mdev, out))
		*mode = MLX5_GET(dcbx_param, out, version_oper);
	/* From driver's point of view, we only care if the mode
         * is host (HOST) or non-host (AUTO)
         */
	if (*mode != MLX5E_DCBX_PARAM_VER_OPER_HOST)
		*mode = MLX5E_DCBX_PARAM_VER_OPER_AUTO;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 67 | 100.00% | 1 | 100.00% | 
| Total | 67 | 100.00% | 1 | 100.00% | 
static void mlx5e_ets_init(struct mlx5e_priv *priv)
{
	struct ieee_ets ets;
	int err;
	int i;
	if (!MLX5_CAP_GEN(priv->mdev, ets))
		return;
	memset(&ets, 0, sizeof(ets));
	ets.ets_cap = mlx5_max_tc(priv->mdev) + 1;
	for (i = 0; i < ets.ets_cap; i++) {
		ets.tc_tx_bw[i] = MLX5E_MAX_BW_ALLOC;
		ets.tc_tsa[i] = IEEE_8021QAZ_TSA_VENDOR;
		ets.prio_tc[i] = i;
	}
	if (ets.ets_cap > 1) {
		/* tclass[prio=0]=1, tclass[prio=1]=0, tclass[prio=i]=i (for i>1) */
		ets.prio_tc[0] = 1;
		ets.prio_tc[1] = 0;
	}
	err = mlx5e_dcbnl_ieee_setets_core(priv, &ets);
	if (err)
		netdev_err(priv->netdev,
			   "%s, Failed to init ETS: %d\n", __func__, err);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 125 | 78.12% | 2 | 50.00% | 
| Tariq Toukan | 35 | 21.88% | 2 | 50.00% | 
| Total | 160 | 100.00% | 4 | 100.00% | 
enum {
	
INIT,
	
DELETE,
};
static void mlx5e_dcbnl_dscp_app(struct mlx5e_priv *priv, int action)
{
	struct dcb_app temp;
	int i;
	if (!MLX5_CAP_GEN(priv->mdev, vport_group_manager))
		return;
	if (!MLX5_DSCP_SUPPORTED(priv->mdev))
		return;
	/* No SEL_DSCP entry in non DSCP state */
	if (priv->dcbx_dp.trust_state != MLX5_QPTS_TRUST_DSCP)
		return;
	temp.selector = IEEE_8021QAZ_APP_SEL_DSCP;
	for (i = 0; i < MLX5E_MAX_DSCP; i++) {
		temp.protocol = i;
		temp.priority = priv->dcbx_dp.dscp2prio[i];
		if (action == INIT)
			dcb_ieee_setapp(priv->netdev, &temp);
		else
			dcb_ieee_delapp(priv->netdev, &temp);
	}
	priv->dcbx.dscp_app_cnt = (action == INIT) ? MLX5E_MAX_DSCP : 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 140 | 100.00% | 2 | 100.00% | 
| Total | 140 | 100.00% | 2 | 100.00% | 
void mlx5e_dcbnl_init_app(struct mlx5e_priv *priv)
{
	mlx5e_dcbnl_dscp_app(priv, INIT);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 17 | 100.00% | 1 | 100.00% | 
| Total | 17 | 100.00% | 1 | 100.00% | 
void mlx5e_dcbnl_delete_app(struct mlx5e_priv *priv)
{
	mlx5e_dcbnl_dscp_app(priv, DELETE);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 17 | 100.00% | 1 | 100.00% | 
| Total | 17 | 100.00% | 1 | 100.00% | 
static void mlx5e_trust_update_tx_min_inline_mode(struct mlx5e_priv *priv,
						  struct mlx5e_params *params)
{
	params->tx_min_inline_mode = mlx5e_params_calculate_tx_min_inline(priv->mdev);
	if (priv->dcbx_dp.trust_state == MLX5_QPTS_TRUST_DSCP &&
	    params->tx_min_inline_mode == MLX5_INLINE_MODE_L2)
		params->tx_min_inline_mode = MLX5_INLINE_MODE_IP;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 49 | 100.00% | 1 | 100.00% | 
| Total | 49 | 100.00% | 1 | 100.00% | 
static void mlx5e_trust_update_sq_inline_mode(struct mlx5e_priv *priv)
{
	struct mlx5e_channels new_channels = {};
	mutex_lock(&priv->state_lock);
	if (!test_bit(MLX5E_STATE_OPENED, &priv->state))
		goto out;
	new_channels.params = priv->channels.params;
	mlx5e_trust_update_tx_min_inline_mode(priv, &new_channels.params);
	/* Skip if tx_min_inline is the same */
	if (new_channels.params.tx_min_inline_mode ==
	    priv->channels.params.tx_min_inline_mode)
		goto out;
	if (mlx5e_open_channels(priv, &new_channels))
		goto out;
	mlx5e_switch_priv_channels(priv, &new_channels, NULL);
out:
	mutex_unlock(&priv->state_lock);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 114 | 100.00% | 1 | 100.00% | 
| Total | 114 | 100.00% | 1 | 100.00% | 
static int mlx5e_set_trust_state(struct mlx5e_priv *priv, u8 trust_state)
{
	int err;
	err =  mlx5_set_trust_state(priv->mdev, trust_state);
	if (err)
		return err;
	priv->dcbx_dp.trust_state = trust_state;
	mlx5e_trust_update_sq_inline_mode(priv);
	return err;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 51 | 100.00% | 2 | 100.00% | 
| Total | 51 | 100.00% | 2 | 100.00% | 
static int mlx5e_set_dscp2prio(struct mlx5e_priv *priv, u8 dscp, u8 prio)
{
	int err;
	err = mlx5_set_dscp2prio(priv->mdev, dscp, prio);
	if (err)
		return err;
	priv->dcbx_dp.dscp2prio[dscp] = prio;
	return err;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 54 | 100.00% | 1 | 100.00% | 
| Total | 54 | 100.00% | 1 | 100.00% | 
static int mlx5e_trust_initialize(struct mlx5e_priv *priv)
{
	struct mlx5_core_dev *mdev = priv->mdev;
	int err;
	if (!MLX5_DSCP_SUPPORTED(mdev))
		return 0;
	err = mlx5_query_trust_state(priv->mdev, &priv->dcbx_dp.trust_state);
	if (err)
		return err;
	mlx5e_trust_update_tx_min_inline_mode(priv, &priv->channels.params);
	err = mlx5_query_dscp2prio(priv->mdev, priv->dcbx_dp.dscp2prio);
	if (err)
		return err;
	return 0;
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 94 | 100.00% | 2 | 100.00% | 
| Total | 94 | 100.00% | 2 | 100.00% | 
void mlx5e_dcbnl_initialize(struct mlx5e_priv *priv)
{
	struct mlx5e_dcbx *dcbx = &priv->dcbx;
	mlx5e_trust_initialize(priv);
	if (!MLX5_CAP_GEN(priv->mdev, qos))
		return;
	if (MLX5_CAP_GEN(priv->mdev, dcbx))
		mlx5e_dcbnl_query_dcbx_mode(priv, &dcbx->mode);
	priv->dcbx.cap = DCB_CAP_DCBX_VER_CEE |
			 DCB_CAP_DCBX_VER_IEEE;
	if (priv->dcbx.mode == MLX5E_DCBX_PARAM_VER_OPER_HOST)
		priv->dcbx.cap |= DCB_CAP_DCBX_HOST;
	mlx5e_ets_init(priv);
}
Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 92 | 100.00% | 4 | 100.00% | 
| Total | 92 | 100.00% | 4 | 100.00% | 
Overall Contributors
| Person | Tokens | Prop | Commits | CommitProp | 
| Huy Nguyen | 3586 | 73.60% | 13 | 54.17% | 
| Saeed Mahameed | 591 | 12.13% | 1 | 4.17% | 
| Tariq Toukan | 282 | 5.79% | 3 | 12.50% | 
| Inbar Karmy | 149 | 3.06% | 1 | 4.17% | 
| Achiad Shochat | 147 | 3.02% | 1 | 4.17% | 
| Gal Pressman | 63 | 1.29% | 2 | 8.33% | 
| Eran Ben Elisha | 27 | 0.55% | 1 | 4.17% | 
| Moshe Shemesh | 24 | 0.49% | 1 | 4.17% | 
| Or Gerlitz | 3 | 0.06% | 1 | 4.17% | 
| Total | 4872 | 100.00% | 24 | 100.00% | 
Information contained on this website is for historical information purposes only and does not indicate or represent copyright ownership.