Change token attr to read buffer
Ramesh Thomas
cover Change token attr to read buffer
This change matches the driver change that changes bandwidth token sysfs attribute to read buffers. Creates new API for read buffers and deprecates existing ones for bw tokens. Generate warnings if configuration file contains token attributes. Config commands leave short option unchanged while renames long options to indicate read buffers. Internal implementation is changed to use read buffers and would fall back to bw token attributes if read buffer attribute is not found due to use of older drivers.
Ramesh Thomas (3):
accel-config: Add support for new attributes related to read buffers
accel-config: Add deprecated attribute and warnings
accel-config: Update manpages to use "read buffer" instead of "token"
.../accfg/accel-config-config-device.txt | 10 +-- .../accfg/accel-config-config-group.txt | 26 +++--- Documentation/accfg/accel-config-list.txt | 28 +++--- accfg/config.c | 70 ++++++++++----- accfg/config_attr.c | 66 +++++++------- accfg/lib/libaccel-config.sym | 13 +++ accfg/lib/libaccfg.c | 90 ++++++++++++++----- accfg/lib/private.h | 10 +-- accfg/libaccel_config.h | 48 +++++++--- accfg/list.c | 12 +-- test/libaccfg.c | 52 +++++------ util/json.c | 8 +- 12 files changed, 268 insertions(+), 165 deletions(-)
Signature · 1 line
2.31.1
Ramesh Thomas
PATCH 1/3 accel-config: Add support for new attributes related to read buffers
This change is to match the driver change of attribute names. The bw "token" attribute names are deprecated and are renamed as "read buffers".
Add new libarary APIs to read and write the new attributes related to read buffers. All internal implementation uses the "read buffer" name. The external API will continue to support the "token" name and will be deprecated. Writes to sysfs will attempt to read/write to "read buffer" attributes and if not found in the case of older drivers, will fall back to "token" attribute names.
Change internal implemenations to use read_buffer name instead of token.
--- accfg/config.c | 64 +++++++++++++++---------- accfg/config_attr.c | 66 ++++++++++++------------- accfg/lib/libaccel-config.sym | 13 +++++ accfg/lib/libaccfg.c | 90 ++++++++++++++++++++++++++--------- accfg/lib/private.h | 10 ++-- accfg/libaccel_config.h | 13 +++++ accfg/list.c | 12 ++--- test/libaccfg.c | 52 ++++++++++---------- util/json.c | 8 ++-- 9 files changed, 208 insertions(+), 120 deletions(-)
accfg/config.c +40 -24
@@ -75,23 +75,30 @@ struct engine_set_table { };static const struct device_set_table device_table[] = { - {"token_limit" , accfg_device_set_token_limit,NULL } + {"token_limit" , accfg_device_set_read_buffer_limit,NULL }, + {"read_buffer_limit" , accfg_device_set_read_buffer_limit,NULL } };static bool is_group_traffic_class_writable (struct accfg_group *group,int val); -static bool is_group_token_attribs_writable (struct accfg_group *group, +static bool is_group_read_buffer_attribs_writable (struct accfg_group *group,int val); -static bool is_group_token_limit_writable (struct accfg_group *group, +static bool is_group_read_buffer_limit_writable (struct accfg_group *group,int val);static const struct group_set_table group_table[] = { - {"tokens_reserved" , accfg_group_set_tokens_reserved,NULL , - is_group_token_attribs_writable }, - {"use_token_limit" , accfg_group_set_use_token_limit,NULL , - is_group_token_limit_writable }, - {"tokens_allowed" , accfg_group_set_tokens_allowed,NULL , - is_group_token_attribs_writable }, + {"tokens_reserved" , accfg_group_set_read_buffers_reserved,NULL , + is_group_read_buffer_attribs_writable }, + {"read_buffers_reserved" , accfg_group_set_read_buffers_reserved,NULL , + is_group_read_buffer_attribs_writable }, + {"use_token_limit" , accfg_group_set_use_read_buffer_limit,NULL , + is_group_read_buffer_limit_writable }, + {"use_read_buffer_limit" , accfg_group_set_use_read_buffer_limit,NULL , + is_group_read_buffer_limit_writable }, + {"tokens_allowed" , accfg_group_set_read_buffers_allowed,NULL , + is_group_read_buffer_attribs_writable }, + {"read_buffers_allowed" , accfg_group_set_read_buffers_allowed,NULL , + is_group_read_buffer_attribs_writable }, {"traffic_class_a" , accfg_group_set_traffic_class_a,NULL , is_group_traffic_class_writable}, {"traffic_class_b" , accfg_group_set_traffic_class_b,NULL ,
@@ -127,22 +134,22 @@ static int configure_json_value(struct accfg_ctx *ctx,static int read_config_file (struct accfg_ctx *ctx,struct config *to_config,struct util_filter_params *util_param); -static bool is_group_token_limit_writable (struct accfg_group *group, +static bool is_group_read_buffer_limit_writable (struct accfg_group *group,int val) {struct accfg_device *dev; -unsigned int token_limit; +unsigned int read_buffer_limit; dev =accfg_group_get_device (group); - token_limit =accfg_device_get_token_limit (dev); -if (token_limit) + read_buffer_limit =accfg_device_get_read_buffer_limit (dev); +if (read_buffer_limit)return true;return false; } -static bool is_group_token_attribs_writable (struct accfg_group *group, +static bool is_group_read_buffer_attribs_writable (struct accfg_group *group,int val) {if (val ==-1 )
@@ -343,11 +350,20 @@ static int group_json_set_val(struct accfg_group *group,return -EINVAL ;if ((accfg_device_get_type (dev) ==ACCFG_DEVICE_IAX ) - && ((!strcmp (group_table[i].name,"tokens_reserved" )) - || (!strcmp (group_table[i].name,"use_token_limit" )) - || (!strcmp (group_table[i].name,"tokens_allowed" )))) { + && ((!strcmp (group_table[i].name, +"tokens_reserved" )) + || (!strcmp (group_table[i].name, +"use_token_limit" )) + || (!strcmp (group_table[i].name, +"tokens_allowed" )) + || (!strcmp (group_table[i].name, +"read_buffers_reserved" )) + || (!strcmp (group_table[i].name, +"use_read_buffer_limit" )) + || (!strcmp (group_table[i].name, +"read_buffers_allowed" ))))return 0 ; - } +if (group_table[i].is_writable && !group_table[i].is_writable (group, val))
@@ -665,21 +681,21 @@ static struct json_object *config_group_to_json(struct accfg_group *group, goto err;json_object_object_add (jgroup,"dev" , jobj); - jobj =json_object_new_int (accfg_group_get_tokens_reserved (group)); + jobj =json_object_new_int (accfg_group_get_read_buffers_reserved (group));if (!jobj) goto err; -json_object_object_add (jgroup,"tokens_reserved" , jobj); - jobj =json_object_new_int (accfg_group_get_use_token_limit (group)); +json_object_object_add (jgroup,"read_buffers_reserved" , jobj); + jobj =json_object_new_int (accfg_group_get_use_read_buffer_limit (group));if (!jobj) goto err; -json_object_object_add (jgroup,"use_token_limit" , jobj); - jobj =json_object_new_int (accfg_group_get_tokens_allowed (group)); +json_object_object_add (jgroup,"use_read_buffer_limit" , jobj); + jobj =json_object_new_int (accfg_group_get_read_buffers_allowed (group));if (!jobj) goto err; -json_object_object_add (jgroup,"tokens_allowed" , jobj); +json_object_object_add (jgroup,"read_buffers_allowed" , jobj); jobj =json_object_new_int (accfg_group_get_traffic_class_a ( group));if (!jobj)
accfg/config_attr.c +33 -33
117 lines not on this page · raw message
accfg/lib/libaccel-config.sym +13 -0
@@ -166,3 +166,16 @@ LIBACCFG_11 { global: accfg_wq_get_occupancy; } LIBACCFG_10; + +LIBACCFG_12 { +global: + accfg_device_get_max_read_buffers; + accfg_device_get_read_buffer_limit; + accfg_device_set_read_buffer_limit; + accfg_group_get_read_buffers_reserved; + accfg_group_get_read_buffers_allowed; + accfg_group_get_use_read_buffer_limit; + accfg_group_set_read_buffers_reserved; + accfg_group_set_read_buffers_allowed; + accfg_group_set_use_read_buffer_limit; +} LIBACCFG_11;
accfg/lib/libaccfg.c +68 -22
175 lines not on this page · raw message
accfg/lib/private.h +5 -5
@@ -47,8 +47,8 @@ struct accfg_device {int ims_size;int max_batch_size;int configurable; -int max_tokens; -unsigned int token_limit; +int max_read_buffers; +unsigned int read_buffer_limit;unsigned int cdev_major;unsigned int version;uint64_t max_transfer_size;
@@ -82,9 +82,9 @@ struct accfg_group {int engines_init;/* Group Attributes */ -unsigned int tokens_reserved; -unsigned int tokens_allowed; -unsigned int use_token_limit; +unsigned int read_buffers_reserved; +unsigned int read_buffers_allowed; +unsigned int use_read_buffer_limit;int traffic_class_a;int traffic_class_b; };
accfg/libaccel_config.h +13 -0
@@ -91,6 +91,7 @@ struct accfg_op_cap {/* parameters read from sysfs of accfg driver */ struct dev_parameters {unsigned int token_limit; +unsigned int read_buffer_limit; };extern char *accfg_basenames[];
@@ -100,6 +101,9 @@ struct group_parameters {unsigned int tokens_reserved;unsigned int tokens_allowed;unsigned int use_token_limit; +unsigned int read_buffers_reserved; +unsigned int read_buffers_allowed; +unsigned int use_read_buffer_limit;int traffic_class_a;int traffic_class_b; };
@@ -187,12 +191,15 @@ bool accfg_device_get_mdev_enabled(struct accfg_device *device);int accfg_device_get_errors (struct accfg_device *device,struct accfg_error *error);enum accfg_device_state accfg_device_get_state (struct accfg_device *device);unsigned int accfg_device_get_max_tokens (struct accfg_device *device); +unsigned int accfg_device_get_max_read_buffers (struct accfg_device *device);unsigned int accfg_device_get_max_batch_size (struct accfg_device *device);unsigned int accfg_device_get_token_limit (struct accfg_device *device); +unsigned int accfg_device_get_read_buffer_limit (struct accfg_device *device);unsigned int accfg_device_get_cdev_major (struct accfg_device *device);unsigned int accfg_device_get_version (struct accfg_device *device);int accfg_device_get_clients (struct accfg_device *device);int accfg_device_set_token_limit (struct accfg_device *dev,int val); +int accfg_device_set_read_buffer_limit (struct accfg_device *dev,int val);int accfg_device_is_active (struct accfg_device *device);unsigned int accfg_device_get_cmd_status (struct accfg_device *device);const char *accfg_device_get_cmd_status_str (struct accfg_device *device);
@@ -234,13 +241,19 @@ uint64_t accfg_group_get_available_size(struct accfg_group *group);struct accfg_device *accfg_group_get_device (struct accfg_group *group);struct accfg_ctx *accfg_group_get_ctx (struct accfg_group *group);int accfg_group_get_tokens_reserved (struct accfg_group *group); +int accfg_group_get_read_buffers_reserved (struct accfg_group *group);int accfg_group_get_tokens_allowed (struct accfg_group *group); +int accfg_group_get_read_buffers_allowed (struct accfg_group *group);int accfg_group_get_use_token_limit (struct accfg_group *group); +int accfg_group_get_use_read_buffer_limit (struct accfg_group *group);int accfg_group_get_traffic_class_a (struct accfg_group *group);int accfg_group_get_traffic_class_b (struct accfg_group *group);int accfg_group_set_tokens_reserved (struct accfg_group *group,int val); +int accfg_group_set_read_buffers_reserved (struct accfg_group *group,int val);int accfg_group_set_tokens_allowed (struct accfg_group *group,int val); +int accfg_group_set_read_buffers_allowed (struct accfg_group *group,int val);int accfg_group_set_use_token_limit (struct accfg_group *group,int val); +int accfg_group_set_use_read_buffer_limit (struct accfg_group *group,int val);int accfg_group_set_traffic_class_a (struct accfg_group *group,int val);int accfg_group_set_traffic_class_b (struct accfg_group *group,int val);
accfg/list.c +6 -6
@@ -68,21 +68,21 @@ static struct json_object *group_to_json(struct accfg_group *group,json_object_object_add (jgroup,"dev" , jobj);if (accfg_device_get_type (dev) !=ACCFG_DEVICE_IAX ) { - jobj =json_object_new_int (accfg_group_get_tokens_reserved (group)); + jobj =json_object_new_int (accfg_group_get_read_buffers_reserved (group));if (!jobj) goto err; -json_object_object_add (jgroup,"tokens_reserved" , jobj); - jobj =json_object_new_int (accfg_group_get_use_token_limit (group)); +json_object_object_add (jgroup,"read_buffers_reserved" , jobj); + jobj =json_object_new_int (accfg_group_get_use_read_buffer_limit (group));if (!jobj) goto err; -json_object_object_add (jgroup,"use_token_limit" , jobj); - jobj =json_object_new_int (accfg_group_get_tokens_allowed (group)); +json_object_object_add (jgroup,"use_read_buffer_limit" , jobj); + jobj =json_object_new_int (accfg_group_get_read_buffers_allowed (group));if (!jobj) goto err; -json_object_object_add (jgroup,"tokens_allowed" , jobj); +json_object_object_add (jgroup,"read_buffers_allowed" , jobj); } jobj = json_object_new_int(accfg_group_get_traffic_class_a(
test/libaccfg.c +26 -26
96 lines not on this page · raw message
util/json.c +4 -4
@@ -165,11 +165,11 @@ struct json_object *util_device_to_json(struct accfg_device *device, goto err;json_object_object_add (jdevice,"dev" , jobj); - jobj =json_object_new_int (accfg_device_get_token_limit (device)); + jobj =json_object_new_int (accfg_device_get_read_buffer_limit (device));if (!jobj) goto err;if (accfg_device_get_type (device) !=ACCFG_DEVICE_IAX ) -json_object_object_add (jdevice,"token_limit" , jobj); +json_object_object_add (jdevice,"read_buffer_limit" , jobj);if (flags &UTIL_JSON_SAVE ) {free (error);
@@ -270,11 +270,11 @@ struct json_object *util_device_to_json(struct accfg_device *device, goto err;json_object_object_add (jdevice,"state" , jobj); - jobj =json_object_new_int (accfg_device_get_max_tokens (device)); + jobj =json_object_new_int (accfg_device_get_max_read_buffers (device));if (!jobj) goto err;if (accfg_device_get_type (device) !=ACCFG_DEVICE_IAX ) -json_object_object_add (jdevice,"max_tokens" , jobj); +json_object_object_add (jdevice,"max_read_buffers" , jobj); ulong_val =accfg_device_get_max_batch_size (device);if (ulong_val >0 ) {
Signature · 1 line
2.31.1
Ramesh Thomas
PATCH 2/3 accel-config: Add deprecated attribute and warnings
In reply to Ramesh ThomasAdd __attribute((deprecated)) to API functions and data structures to generate compile time warnings. Add a one time warning if "token" attribute is found in configuration files.
--- accfg/config.c | 6 ++++++ accfg/libaccel_config.h | 35 ++++++++++++++++++++++------------- 2 files changed, 28 insertions(+), 13 deletions(-)
accfg/config.c +6 -0
@@ -24,6 +24,7 @@ static bool verbose;static bool enable;static bool forced;static struct util_filter_params util_param; +static bool warn_once = true;static LIST_HEAD (activate_dev_list);static LIST_HEAD (activate_wq_list);
@@ -630,6 +631,11 @@ static int configure_json_value(struct accfg_ctx *ctx,if (!parent)return 0 ; +if (warn_once &&strstr (key,"token" )) { +fprintf (stderr,"Warning: \"token\" attributes are deprecated\n" ); + warn_once = false; + } +if (dev && dev_state !=ACCFG_DEVICE_ENABLED ) { rc =device_json_set_val (dev, jobj, key);if (rc <0 ) {
accfg/libaccel_config.h +22 -13
@@ -90,7 +90,7 @@ struct accfg_op_cap {/* parameters read from sysfs of accfg driver */ struct dev_parameters { -unsigned int token_limit; +unsigned int token_limit __attribute((deprecated));unsigned int read_buffer_limit; };
@@ -98,9 +98,9 @@ extern char *accfg_basenames[];extern char *accfg_mdev_basenames[];struct group_parameters { -unsigned int tokens_reserved; -unsigned int tokens_allowed; -unsigned int use_token_limit; +unsigned int tokens_reserved __attribute((deprecated)); +unsigned int tokens_allowed __attribute((deprecated)); +unsigned int use_token_limit __attribute((deprecated));unsigned int read_buffers_reserved;unsigned int read_buffers_allowed;unsigned int use_read_buffer_limit;
@@ -190,15 +190,18 @@ bool accfg_device_get_pasid_enabled(struct accfg_device *device);bool accfg_device_get_mdev_enabled (struct accfg_device *device);int accfg_device_get_errors (struct accfg_device *device,struct accfg_error *error);enum accfg_device_state accfg_device_get_state (struct accfg_device *device); -unsigned int accfg_device_get_max_tokens (struct accfg_device *device); +unsigned int accfg_device_get_max_tokens (struct accfg_device *device) + __attribute((deprecated));unsigned int accfg_device_get_max_read_buffers (struct accfg_device *device);unsigned int accfg_device_get_max_batch_size (struct accfg_device *device); -unsigned int accfg_device_get_token_limit (struct accfg_device *device); +unsigned int accfg_device_get_token_limit (struct accfg_device *device) + __attribute((deprecated));unsigned int accfg_device_get_read_buffer_limit (struct accfg_device *device);unsigned int accfg_device_get_cdev_major (struct accfg_device *device);unsigned int accfg_device_get_version (struct accfg_device *device);int accfg_device_get_clients (struct accfg_device *device); -int accfg_device_set_token_limit (struct accfg_device *dev,int val); +int accfg_device_set_token_limit (struct accfg_device *dev,int val) + __attribute((deprecated));int accfg_device_set_read_buffer_limit (struct accfg_device *dev,int val);int accfg_device_is_active (struct accfg_device *device);unsigned int accfg_device_get_cmd_status (struct accfg_device *device);
@@ -240,19 +243,25 @@ uint64_t accfg_group_get_size(struct accfg_group *group);uint64_t accfg_group_get_available_size (struct accfg_group *group);struct accfg_device *accfg_group_get_device (struct accfg_group *group);struct accfg_ctx *accfg_group_get_ctx (struct accfg_group *group); -int accfg_group_get_tokens_reserved (struct accfg_group *group); +int accfg_group_get_tokens_reserved (struct accfg_group *group) + __attribute((deprecated));int accfg_group_get_read_buffers_reserved (struct accfg_group *group); -int accfg_group_get_tokens_allowed (struct accfg_group *group); +int accfg_group_get_tokens_allowed (struct accfg_group *group) + __attribute((deprecated));int accfg_group_get_read_buffers_allowed (struct accfg_group *group); -int accfg_group_get_use_token_limit (struct accfg_group *group); +int accfg_group_get_use_token_limit (struct accfg_group *group) + __attribute((deprecated));int accfg_group_get_use_read_buffer_limit (struct accfg_group *group);int accfg_group_get_traffic_class_a (struct accfg_group *group);int accfg_group_get_traffic_class_b (struct accfg_group *group); -int accfg_group_set_tokens_reserved (struct accfg_group *group,int val); +int accfg_group_set_tokens_reserved (struct accfg_group *group,int val) + __attribute((deprecated));int accfg_group_set_read_buffers_reserved (struct accfg_group *group,int val); -int accfg_group_set_tokens_allowed (struct accfg_group *group,int val); +int accfg_group_set_tokens_allowed (struct accfg_group *group,int val) + __attribute((deprecated));int accfg_group_set_read_buffers_allowed (struct accfg_group *group,int val); -int accfg_group_set_use_token_limit (struct accfg_group *group,int val); +int accfg_group_set_use_token_limit (struct accfg_group *group,int val) + __attribute((deprecated));int accfg_group_set_use_read_buffer_limit (struct accfg_group *group,int val);int accfg_group_set_traffic_class_a (struct accfg_group *group,int val);int accfg_group_set_traffic_class_b (struct accfg_group *group,int val);
Signature · 1 line
2.31.1
Ramesh Thomas
PATCH 3/3 accel-config: Update manpages to use "read buffer" instead of "token"
In reply to Ramesh ThomasUpdate device and group config commands documentation to refer to read buffers instead of bw tokens. The short option is kept the same but the long option is renamed. Update list command example replacing "token" with "read_buffer".
--- .../accfg/accel-config-config-device.txt | 10 +++---- .../accfg/accel-config-config-group.txt | 26 ++++++++--------- Documentation/accfg/accel-config-list.txt | 28 +++++++++---------- 3 files changed, 32 insertions(+), 32 deletions(-)
Documentation/accfg/accel-config-config-device.txt +5 -5
@@ -14,16 +14,16 @@ SYNOPSIS EXAMPLE ------- -accel-config config-device dsa0 --token-limit=1 +accel-config config-device dsa0 --read-buffer-limit=1 OPTIONS ------- -l:: ---token-limit=:: - This specifies the maximum number of bandwidth tokens that may be +--read-buffer-limit=:: + This specifies the maximum number of read buffers that may be in use at one time by operations that access low bandwidth memory. - This number of bandwidth tokens is shared by all descriptors accessing - low bandwidth memory across the entire device. token_limit should be + This number of read buffers is shared by all descriptors accessing + low bandwidth memory across the entire device. read-buffer-limit should be more than 0. include::../copyright.txt[]
Documentation/accfg/accel-config-config-group.txt +13 -13
@@ -14,33 +14,33 @@ SYNOPSIS EXAMPLE ------- -accel-config config-group dsa0/group0.0 --tokens-reserved=1 +accel-config config-group dsa0/group0.0 --read-buffers-reserved=1 OPTIONS ------- -r:: ---tokens-reserved=:: - specify the number of badwdith tokens reserved for the use of engines +--read-buffers-reserved=:: + specify the number of read buffers reserved for the use of engines in the group. The limit of this value must be: - - The sum of all tokens-reserved for all groups must be less than or - equal to total badwidth tokens from group capability field of the + - The sum of all read-buffers-reserved for all groups must be less than or + equal to total read buffers from group capability field of the device. -t:: ---tokens-allowed=:: - specify the maxinum number of bandwidth tokens that may be in use at +--read-buffers-allowed=:: + specify the maxinum number of read buffers that may be in use at one time by all engines in the group. This value can be used to limit the maximum bandwidth used by engines in the group. The limit of this value must be: - greater than 0 - - greater than or equal to the tokens-reserved value for this group. - - less than or equal to the sum of tokens reserved field and the - non-reserved bandwidth tokens (total bandwidth tokens - total - tokens-reserved for all groups). + - greater than or equal to the read-buffers-reserved value for this group. + - less than or equal to the sum of read-buffers reserved-field and the + non-reserved read buffers (total read buffers - total read buffers + reserved for all groups). -l:: ---use-token-limit=:: - toggle the enabling of token limt usage. use-token-limit should be +--use-read-buffer-limit=:: + toggle the enabling of read-buffer limt usage. use-read-buffer-limit should be either 0 or 1. -a::
Documentation/accfg/accel-config-list.txt +14 -14
@@ -29,7 +29,7 @@ EXAMPLE [ { "dev":"dsa0", - "token_limit":0, + "read_buffer_limit":0, "max_groups":4, "max_work_queues":8, "max_engines":4,
@@ -37,7 +37,7 @@ EXAMPLE "numa_node":-1, "op_cap":"0x1003f03ff", "state":"enabled", - "max_tokens":64, + "max_read_buffers":64, "max_batch_size":512, "ims_size":256, "max_transfer_size":2147483648,
@@ -48,9 +48,9 @@ EXAMPLE "groups":[ { "dev":"group0.0", - "tokens_reserved":0, - "use_token_limit":0, - "tokens_allowed":0, + "read_buffers_reserved":0, + "use_read_buffer_limit":0, + "read_buffers_allowed":0, "traffic_class_a":-1, "traffic_class_b":-1, "grouped_workqueues":[
@@ -82,9 +82,9 @@ EXAMPLE }, { "dev":"group0.1", - "tokens_reserved":0, - "use_token_limit":0, - "tokens_allowed":0, + "read_buffers_reserved":0, + "use_read_buffer_limit":0, + "read_buffers_allowed":0, "traffic_class_a":-1, "traffic_class_b":-1, "grouped_workqueues":[
@@ -116,17 +116,17 @@ EXAMPLE }, { "dev":"group0.2", - "tokens_reserved":0, - "use_token_limit":0, - "tokens_allowed":0, + "read_buffers_reserved":0, + "use_read_buffer_limit":0, + "read_buffers_allowed":0, "traffic_class_a":-1, "traffic_class_b":-1 }, { "dev":"group0.3", - "tokens_reserved":0, - "use_token_limit":0, - "tokens_allowed":0, + "read_buffers_reserved":0, + "use_read_buffer_limit":0, + "read_buffers_allowed":0, "traffic_class_a":-1, "traffic_class_b":-1 }
Signature · 1 line
2.31.1
Dave Jiang
Reviewed-by on the v1 seriesQuoted 9 lines · Ramesh Thomas
This change matches the driver change that changes bandwidth token sysfs attribute to read buffers. Creates new API for read buffers and deprecates existing ones for bw tokens. Generate warnings if configuration file contains token attributes. Config commands leave short option unchanged while renames long options to indicate read buffers. Internal implementation is changed to use read buffers and would fall back to bw token attributes if read buffer attribute is not found due to use of older drivers.
Quoted 4 lines
Ramesh Thomas (3):
accel-config: Add support for new attributes related to read buffers
accel-config: Add deprecated attribute and warnings
accel-config: Update manpages to use "read buffer" instead of "token"
LGTM
for the series.
Quoted 15 lines
.../accfg/accel-config-config-device.txt | 10 +-- .../accfg/accel-config-config-group.txt | 26 +++--- Documentation/accfg/accel-config-list.txt | 28 +++--- accfg/config.c | 70 ++++++++++----- accfg/config_attr.c | 66 +++++++------- accfg/lib/libaccel-config.sym | 13 +++ accfg/lib/libaccfg.c | 90 ++++++++++++++----- accfg/lib/private.h | 10 +-- accfg/libaccel_config.h | 48 +++++++--- accfg/list.c | 12 +-- test/libaccfg.c | 52 +++++------ util/json.c | 8 +- 12 files changed, 268 insertions(+), 165 deletions(-)