From patchwork Fri Aug 14 22:43:46 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Kirsher, Jeffrey T" X-Patchwork-Id: 31455 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 55FEBB7B96 for ; Sat, 15 Aug 2009 08:44:27 +1000 (EST) Received: by ozlabs.org (Postfix) id 4A12FDDD0B; Sat, 15 Aug 2009 08:44:27 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id CEA03DDD01 for ; Sat, 15 Aug 2009 08:44:26 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757227AbZHNWoH (ORCPT ); Fri, 14 Aug 2009 18:44:07 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757229AbZHNWoH (ORCPT ); Fri, 14 Aug 2009 18:44:07 -0400 Received: from qmta14.emeryville.ca.mail.comcast.net ([76.96.27.212]:58145 "EHLO QMTA14.emeryville.ca.mail.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757226AbZHNWoF (ORCPT ); Fri, 14 Aug 2009 18:44:05 -0400 Received: from OMTA05.emeryville.ca.mail.comcast.net ([76.96.30.43]) by QMTA14.emeryville.ca.mail.comcast.net with comcast id ULon1c00G0vp7WLAENk8KY; Fri, 14 Aug 2009 22:44:08 +0000 Received: from localhost.localdomain ([63.64.152.142]) by OMTA05.emeryville.ca.mail.comcast.net with comcast id UNjo1c00134bfcX8RNjqj8; Fri, 14 Aug 2009 22:44:06 +0000 From: Jeff Kirsher Subject: [net-next PATCH 08/12] dcbnl: Add support for setapp/getapp commands to dcbnl To: davem@davemloft.net Cc: netdev@vger.kernel.org, linux-scsi@vger.kernel.org, gospo@redhat.com, Yi Zou , Peter P Waskiewicz Jr , Jeff Kirsher Date: Fri, 14 Aug 2009 15:43:46 -0700 Message-ID: <20090814224346.1640.72037.stgit@localhost.localdomain> In-Reply-To: <20090814223857.1640.26881.stgit@localhost.localdomain> References: <20090814223857.1640.26881.stgit@localhost.localdomain> User-Agent: StGIT/0.14.3 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Yi Zou This patch adds dcbnl command definitions to support setapp/getapp functionality from the IEEE 802.1Qaz Data Center Bridging Capability Exchange protocol (DCBX) specification. Section 3.3 defines the application protocol and its 802.1p user priority in DCBX, which is implemented here as a pair of setapp/getapp commands in the kernel dcbnl for setting and retrieving the user priority for an given application protocol. The protocol is identified by the combination of an id and an idtype. Currently, when idtype is 0, the corresponding id gives the ether type of this protocol, e.g., for FCoE, it will be 0x8906; when idtype is 1, then the corresponding id gives the TCP or UDP port number. For more information regarding DCBX spec., please refer to the following: http://www.ieee802.org/1/files/public/docs2008/ az-wadekar-dcbx-capability-exchange-discovery-protocol-1108-v1.01.pdf Signed-off-by: Yi Zou Acked-by: Peter P Waskiewicz Jr Signed-off-by: Jeff Kirsher --- include/linux/dcbnl.h | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/dcbnl.h b/include/linux/dcbnl.h index 7d2e100..b7cdbb4 100644 --- a/include/linux/dcbnl.h +++ b/include/linux/dcbnl.h @@ -50,6 +50,8 @@ struct dcbmsg { * @DCB_CMD_SNUMTCS: set the number of traffic classes * @DCB_CMD_GBCN: set backward congestion notification configuration * @DCB_CMD_SBCN: get backward congestion notification configration. + * @DCB_CMD_GAPP: get application protocol configuration + * @DCB_CMD_SAPP: set application protocol configuration */ enum dcbnl_commands { DCB_CMD_UNDEFINED, @@ -80,6 +82,9 @@ enum dcbnl_commands { DCB_CMD_BCN_GCFG, DCB_CMD_BCN_SCFG, + DCB_CMD_GAPP, + DCB_CMD_SAPP, + __DCB_CMD_ENUM_MAX, DCB_CMD_MAX = __DCB_CMD_ENUM_MAX - 1, }; @@ -114,6 +119,7 @@ enum dcbnl_attrs { DCB_ATTR_CAP, DCB_ATTR_NUMTCS, DCB_ATTR_BCN, + DCB_ATTR_APP, __DCB_ATTR_ENUM_MAX, DCB_ATTR_MAX = __DCB_ATTR_ENUM_MAX - 1, @@ -338,5 +344,17 @@ enum dcb_general_attr_values { DCB_ATTR_VALUE_UNDEFINED = 0xff }; +#define DCB_APP_IDTYPE_ETHTYPE 0x00 +#define DCB_APP_IDTYPE_PORTNUM 0x01 +enum dcbnl_app_attrs { + DCB_APP_ATTR_UNDEFINED, + + DCB_APP_ATTR_IDTYPE, + DCB_APP_ATTR_ID, + DCB_APP_ATTR_PRIORITY, + + __DCB_APP_ATTR_ENUM_MAX, + DCB_APP_ATTR_MAX = __DCB_APP_ATTR_ENUM_MAX - 1, +}; #endif /* __LINUX_DCBNL_H__ */