* [Accel-config] [PATCH 1/2] accel-config: Allow -1 wq->group-id
@ 2021-03-12 1:47 ramesh.thomas
0 siblings, 0 replies; only message in thread
From: ramesh.thomas @ 2021-03-12 1:47 UTC (permalink / raw)
To: accel-config
[-- Attachment #1: Type: text/plain, Size: 1351 bytes --]
From: Ramesh Thomas <ramesh.thomas(a)intel.com>
-1 is a special value passed in config-wq to dissasociate the wq from
groups
Signed-off-by: Ramesh Thomas <ramesh.thomas(a)intel.com>
---
accfg/config_attr.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/accfg/config_attr.c b/accfg/config_attr.c
index 52b9fa8..1f884fd 100644
--- a/accfg/config_attr.c
+++ b/accfg/config_attr.c
@@ -133,7 +133,8 @@ static int accel_config_parse_group_attribs(struct accfg_group *group,
static int accel_config_parse_wq_attribs(struct accfg_device *device,
struct accfg_wq *wq, struct wq_parameters *wq_params)
{
- unsigned int max_groups, max_wq_size, max_batch_size;
+ int max_groups;
+ unsigned int max_wq_size, max_batch_size;
uint64_t max_transfer_size;
int rc = 0;
@@ -158,10 +159,11 @@ static int accel_config_parse_wq_attribs(struct accfg_device *device,
return -EINVAL;
}
- if (((unsigned int)wq_params->group_id >= max_groups)
- && (wq_params->group_id != INT_MAX)) {
+ if ((wq_params->group_id >= max_groups) &&
+ (wq_params->group_id != INT_MAX)) {
fprintf(stderr,
- "valid group_id should be 0 to %d\n", max_groups-1);
+ "valid group id should be 0 to %d or -1 to dissociate the wq from groups\n",
+ max_groups-1);
return -EINVAL;
}
--
2.26.2
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-03-12 1:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-12 1:47 [Accel-config] [PATCH 1/2] accel-config: Allow -1 wq->group-id ramesh.thomas
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.