提交 dc166e22 编写于 作者: J John Fastabend 提交者: Jeff Kirsher

ixgbe: DCB remove ixgbe_fcoe_getapp routine

Remove ixgbe_fcoe_getapp() and use the generic kernel
routine instead. Also add application priority to the
kernel maintained list on setapp so applications and
stacks can query the value.
Signed-off-by: NJohn Fastabend <john.r.fastabend@intel.com>
Tested-by: NRoss Brattain <ross.b.brattain@intel.com>
Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
上级 f8628d40
...@@ -542,24 +542,15 @@ static void ixgbe_dcbnl_setpfcstate(struct net_device *netdev, u8 state) ...@@ -542,24 +542,15 @@ static void ixgbe_dcbnl_setpfcstate(struct net_device *netdev, u8 state)
static u8 ixgbe_dcbnl_getapp(struct net_device *netdev, u8 idtype, u16 id) static u8 ixgbe_dcbnl_getapp(struct net_device *netdev, u8 idtype, u16 id)
{ {
struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev);
u8 rval = 0; struct dcb_app app = {
.selector = idtype,
.protocol = id,
};
if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE))
return rval; return 0;
switch (idtype) { return dcb_getapp(netdev, &app);
case DCB_APP_IDTYPE_ETHTYPE:
#ifdef IXGBE_FCOE
if (id == ETH_P_FCOE)
rval = ixgbe_fcoe_getapp(adapter);
#endif
break;
case DCB_APP_IDTYPE_PORTNUM:
break;
default:
break;
}
return rval;
} }
/** /**
...@@ -576,10 +567,17 @@ static u8 ixgbe_dcbnl_setapp(struct net_device *netdev, ...@@ -576,10 +567,17 @@ static u8 ixgbe_dcbnl_setapp(struct net_device *netdev,
{ {
struct ixgbe_adapter *adapter = netdev_priv(netdev); struct ixgbe_adapter *adapter = netdev_priv(netdev);
u8 rval = 1; u8 rval = 1;
struct dcb_app app = {
.selector = idtype,
.protocol = id,
.priority = up
};
if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE)) if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_CEE))
return rval; return rval;
rval = dcb_setapp(netdev, &app);
switch (idtype) { switch (idtype) {
case DCB_APP_IDTYPE_ETHTYPE: case DCB_APP_IDTYPE_ETHTYPE:
#ifdef IXGBE_FCOE #ifdef IXGBE_FCOE
......
...@@ -812,21 +812,6 @@ int ixgbe_fcoe_disable(struct net_device *netdev) ...@@ -812,21 +812,6 @@ int ixgbe_fcoe_disable(struct net_device *netdev)
} }
#ifdef CONFIG_IXGBE_DCB #ifdef CONFIG_IXGBE_DCB
/**
* ixgbe_fcoe_getapp - retrieves current user priority bitmap for FCoE
* @adapter : ixgbe adapter
*
* Finds out the corresponding user priority bitmap from the current
* traffic class that FCoE belongs to. Returns 0 as the invalid user
* priority bitmap to indicate an error.
*
* Returns : 802.1p user priority bitmap for FCoE
*/
u8 ixgbe_fcoe_getapp(struct ixgbe_adapter *adapter)
{
return 1 << adapter->fcoe.up;
}
/** /**
* ixgbe_fcoe_setapp - sets the user priority bitmap for FCoE * ixgbe_fcoe_setapp - sets the user priority bitmap for FCoE
* @adapter : ixgbe adapter * @adapter : ixgbe adapter
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册