128 lines
4.8 KiB
Diff
128 lines
4.8 KiB
Diff
From 4bf0f2db41be0b282e63646fb6b31f0a938d3865 Mon Sep 17 00:00:00 2001
|
|
From: John Fastabend <john.r.fastabend@intel.com>
|
|
Date: Wed, 6 Apr 2011 09:16:22 -0700
|
|
Subject: [PATCH 50/51] lldpad: DCB, remove iSCSI tc qdisc and filters
|
|
|
|
This removes creating the multiq qdisc and iSCSI filter when
|
|
the iSCSI APP TLV is set. The multq qdisc was being created
|
|
and a filter to map iSCSI traffic to the queue number that is
|
|
being advertised as the app priority for iSCSI was setup.
|
|
But this implementation _only_ works on ixgbe drivers before
|
|
kernel 2.6.38 where this queue is actually mapped to the
|
|
correct traffic class. Probably worse is it breaks other
|
|
CNAs that use the kernel API select_queue() or skb->priority
|
|
to traffic class mappings to steer traffic.
|
|
|
|
Additionally, even if the host is not running iSCSI at all
|
|
the qdisc and filter are added if the switch advertises
|
|
the iSCSI APP TLV. By adding the qdisc we adversely effect
|
|
FCoE performance.
|
|
|
|
This patch removes the adding of the qdisc and filters
|
|
resolving the issues above.
|
|
|
|
Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
|
|
Signed-off-by: Petr Sabata <psabata@redhat.com>
|
|
---
|
|
dcb_protocol.c | 5 ++---
|
|
include/dcb_driver_interface.h | 3 +--
|
|
lldp_dcbx_nl.c | 33 ++-------------------------------
|
|
3 files changed, 5 insertions(+), 36 deletions(-)
|
|
|
|
diff --git a/dcb_protocol.c b/dcb_protocol.c
|
|
index b841259..4596a5d 100644
|
|
--- a/dcb_protocol.c
|
|
+++ b/dcb_protocol.c
|
|
@@ -2772,7 +2772,7 @@ int set_configuration(char *device_name, u32 EventFlag)
|
|
app_data.dcb_app_idtype = DCB_APP_IDTYPE_ETHTYPE;
|
|
app_data.dcb_app_id = APP_FCOE_ETHTYPE;
|
|
app_data.dcb_app_priority = Oper->second->AppData[0];
|
|
- return set_hw_app0(device_name, &app_data);
|
|
+ return set_hw_app(device_name, &app_data);
|
|
} else if (DCB_TEST_FLAGS(EventFlag, DCB_LOCAL_CHANGE_APPTLV(APP_ISCSI_STYPE),
|
|
DCB_LOCAL_CHANGE_APPTLV(APP_ISCSI_STYPE)) ||
|
|
DCB_TEST_FLAGS(EventFlag, DCB_REMOTE_CHANGE_APPTLV(APP_ISCSI_STYPE),
|
|
@@ -2792,8 +2792,7 @@ int set_configuration(char *device_name, u32 EventFlag)
|
|
app_data.dcb_app_id = APP_ISCSI_PORT;
|
|
app_data.dcb_app_priority = Oper->second->AppData[0];
|
|
|
|
- return set_hw_app1(device_name, &app_data,
|
|
- Local->second->protocol.OperMode);
|
|
+ return set_hw_app(device_name, &app_data);
|
|
}
|
|
return dcb_success;
|
|
}
|
|
diff --git a/include/dcb_driver_interface.h b/include/dcb_driver_interface.h
|
|
index e4b5802..3e1c59f 100644
|
|
--- a/include/dcb_driver_interface.h
|
|
+++ b/include/dcb_driver_interface.h
|
|
@@ -42,8 +42,7 @@ typedef struct appgroup_attribs {
|
|
int set_hw_pg(char *device_name, pgroup_attribs *pg_data, bool Opermode);
|
|
int set_hw_pfc(char *device_name, dcb_pfc_list_type pfc_data, bool Opermode);
|
|
|
|
-int set_hw_app0(char *device_name, appgroup_attribs *app_data);
|
|
-int set_hw_app1(char *device_name, appgroup_attribs *app_data, int mode);
|
|
+int set_hw_app(char *device_name, appgroup_attribs *app_data);
|
|
|
|
int set_hw_all(char *device_name);
|
|
|
|
diff --git a/lldp_dcbx_nl.c b/lldp_dcbx_nl.c
|
|
index a860724..ce3d613 100644
|
|
--- a/lldp_dcbx_nl.c
|
|
+++ b/lldp_dcbx_nl.c
|
|
@@ -702,13 +702,13 @@ int set_hw_pfc(char *ifname, dcb_pfc_list_type pfc_data,
|
|
/* returns: 0 on success
|
|
* 1 on failure
|
|
*/
|
|
-int set_hw_app0(char *ifname, appgroup_attribs *app_data)
|
|
+int set_hw_app(char *ifname, appgroup_attribs *app_data)
|
|
{
|
|
struct nlmsghdr *nlh;
|
|
struct rtattr *rta_parent, *rta_child;
|
|
int seq;
|
|
|
|
- LLDPAD_DBG("set_hw_app0: %s\n", ifname);
|
|
+ LLDPAD_DBG("set_hw_app: %s\n", ifname);
|
|
|
|
nlh = start_msg(RTM_SETDCB, DCB_CMD_SAPP);
|
|
if (NULL == nlh)
|
|
@@ -748,35 +748,6 @@ void run_cmd(char *cmd, ...)
|
|
return;
|
|
}
|
|
|
|
-/* returns: 0 on success
|
|
- * 1 on failure
|
|
-*/
|
|
-int set_hw_app1(char *ifname, appgroup_attribs *app_data, int mode)
|
|
-{
|
|
- int queue;
|
|
-
|
|
- LLDPAD_INFO(" set_hw_app1: %s, %s, pri - %d\n", ifname,
|
|
- mode ? "Enabled" : "Disabled", mode);
|
|
-
|
|
- /* find first bit set in u8 bitmask for queue_mapping */
|
|
- queue = ffs(app_data->dcb_app_priority);
|
|
-
|
|
- run_cmd("tc qdisc del dev %s root 2>/dev/null", ifname, NULL, NULL);
|
|
- if (mode) {
|
|
- run_cmd("tc qdisc add dev %s root handle 1: multiq", ifname, NULL, NULL);
|
|
- run_cmd("tc filter add dev %s protocol ip parent 1: u32 match ip dport %d 0xffff action skbedit queue_mapping %d", ifname, 3260, queue);
|
|
- run_cmd("tc filter add dev %s protocol ip parent 1: u32 match ip sport %d 0xffff action skbedit queue_mapping %d", ifname, 3260, queue);
|
|
- run_cmd("tc filter add dev %s protocol ipv6 parent 1: u32 match ip6 dport %d 0xffff action skbedit queue_mapping %d", ifname, 3260, queue);
|
|
- run_cmd("tc filter add dev %s protocol ipv6 parent 1: u32 match ip6 sport %d 0xffff action skbedit queue_mapping %d", ifname, 3260, queue);
|
|
- }
|
|
-
|
|
- /* And push configuration to kernel */
|
|
- set_hw_app0(ifname, app_data);
|
|
-
|
|
- return(0);
|
|
-
|
|
-}
|
|
-
|
|
int set_hw_all(char *ifname)
|
|
{
|
|
struct nlmsghdr *nlh;
|
|
--
|
|
1.7.4.4
|
|
|