提交 c216e876 编写于 作者: H Hannes Reinecke 提交者: Martin K. Petersen

scsi: fcoe: set default TC priority

If DCB is not enabled or compiled in we still should be setting
a sane default priority. So put FCoE frames in priority class
'interactive' and FIP frames in priority class 'besteffort'.
Signed-off-by: NHannes Reinecke <hare@suse.com>
Reviewed-by: NBart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 e0a25286
...@@ -2168,6 +2168,8 @@ static bool fcoe_match(struct net_device *netdev) ...@@ -2168,6 +2168,8 @@ static bool fcoe_match(struct net_device *netdev)
*/ */
static void fcoe_dcb_create(struct fcoe_interface *fcoe) static void fcoe_dcb_create(struct fcoe_interface *fcoe)
{ {
int ctlr_prio = TC_PRIO_BESTEFFORT;
int fcoe_prio = TC_PRIO_INTERACTIVE;
#ifdef CONFIG_DCB #ifdef CONFIG_DCB
int dcbx; int dcbx;
u8 fup, up; u8 fup, up;
...@@ -2194,10 +2196,12 @@ static void fcoe_dcb_create(struct fcoe_interface *fcoe) ...@@ -2194,10 +2196,12 @@ static void fcoe_dcb_create(struct fcoe_interface *fcoe)
fup = dcb_getapp(netdev, &app); fup = dcb_getapp(netdev, &app);
} }
fcoe->priority = ffs(up) ? ffs(up) - 1 : 0; fcoe_prio = ffs(up) ? ffs(up) - 1 : 0;
ctlr->priority = ffs(fup) ? ffs(fup) - 1 : fcoe->priority; ctlr_prio = ffs(fup) ? ffs(fup) - 1 : fcoe_prio;
} }
#endif #endif
fcoe->priority = fcoe_prio;
ctlr->priority = ctlr_prio;
} }
enum fcoe_create_link_state { enum fcoe_create_link_state {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册