Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Jun 2016 20:42:46 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r301520 - head/sys/dev/cxgbe
Message-ID:  <201606062042.u56KgkpR011141@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Mon Jun  6 20:42:46 2016
New Revision: 301520
URL: https://svnweb.freebsd.org/changeset/base/301520

Log:
  cxgbe(4): Create a reusable struct type for scheduling class parameters.
  
  Sponsored by:	Chelsio Communications

Modified:
  head/sys/dev/cxgbe/t4_ioctl.h

Modified: head/sys/dev/cxgbe/t4_ioctl.h
==============================================================================
--- head/sys/dev/cxgbe/t4_ioctl.h	Mon Jun  6 20:38:34 2016	(r301519)
+++ head/sys/dev/cxgbe/t4_ioctl.h	Mon Jun  6 20:42:46 2016	(r301520)
@@ -215,6 +215,20 @@ struct t4_filter {
 	struct t4_filter_specification fs;
 };
 
+/* Tx Scheduling Class parameters */
+struct t4_sched_class_params {
+	int8_t   level;		/* scheduler hierarchy level */
+	int8_t   mode;		/* per-class or per-flow */
+	int8_t   rateunit;	/* bit or packet rate */
+	int8_t   ratemode;	/* %port relative or kbps absolute */
+	int8_t   channel;	/* scheduler channel [0..N] */
+	int8_t   cl;		/* scheduler class [0..N] */
+	int32_t  minrate;	/* minimum rate */
+	int32_t  maxrate;	/* maximum rate */
+	int16_t  weight;	/* percent weight */
+	int16_t  pktsize;	/* average packet size */
+};
+
 /*
  * Support for "sched-class" command to allow a TX Scheduling Class to be
  * programmed with various parameters.
@@ -226,19 +240,7 @@ struct t4_sched_params {
 		struct {		/* sub-command SCHED_CLASS_CONFIG */
 			int8_t   minmax;	/* minmax enable */
 		} config;
-		struct {		/* sub-command SCHED_CLASS_PARAMS */
-			int8_t   level;		/* scheduler hierarchy level */
-			int8_t   mode;		/* per-class or per-flow */
-			int8_t   rateunit;	/* bit or packet rate */
-			int8_t   ratemode;	/* %port relative or kbps
-						   absolute */
-			int8_t   channel;	/* scheduler channel [0..N] */
-			int8_t   cl;		/* scheduler class [0..N] */
-			int32_t  minrate;	/* minimum rate */
-			int32_t  maxrate;	/* maximum rate */
-			int16_t  weight;	/* percent weight */
-			int16_t  pktsize;	/* average packet size */
-		} params;
+		struct t4_sched_class_params params;
 		uint8_t     reserved[6 + 8 * 8];
 	} u;
 };



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606062042.u56KgkpR011141>