[PATCH v2] fix: cls: invalid CoS index#405
Closed
bala-manoharan wants to merge 2 commits intoOpenDataPlane:masterfrom
Closed
[PATCH v2] fix: cls: invalid CoS index#405bala-manoharan wants to merge 2 commits intoOpenDataPlane:masterfrom
bala-manoharan wants to merge 2 commits intoOpenDataPlane:masterfrom
Conversation
Fixes: https://bugs.linaro.org/show_bug.cgi?id=3576 Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Bill-Fischofer-Linaro
suggested changes
Jan 18, 2018
| _odp_cls_update_hash_proto(cos, | ||
| param->hash_proto); | ||
| tbl_index = cos->s.index * CLS_COS_QUEUE_MAX; | ||
| tbl_index = i * CLS_COS_QUEUE_MAX; |
Contributor
There was a problem hiding this comment.
Since we're bug fixing here, if the odp_queue_create() call below fails, it should unwind the previous successful creates before returning ODP_COS_INVALID to avoid leaking queues:
for (j = 0; j < CLS_COS_QUEUE_MAX; j++) {
queue = odp_queue_create(NULL, &cos->s.queue_param);
if (queue == ODP_QUEUE_INVALID) {
while (j > 0)
odp_queue_destroy(queue_grp_tbl->s.queue[tbl_index + j--]);
UNLOCK(&cos->s.lock);
return ODP_COS_INVALID;
}
queue_grp_tbl->s.queue[tbl_index + j] = queue;
}
This could be a separate commit or PR as you prefer.
Fixes: https://bugs.linaro.org/show_bug.cgi?id=3576 Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Codecov Report
@@ Coverage Diff @@
## master #405 +/- ##
=============================================
- Coverage 78.574% 78.508% -0.067%
=============================================
Files 196 196
Lines 34818 34818
=============================================
- Hits 27358 27335 -23
- Misses 7460 7483 +23
|
Bill-Fischofer-Linaro
approved these changes
Jan 22, 2018
Contributor
|
@muvarov Not clear why checkpatch is failing on this PR. It looks like it's failing to launch properly. I've forced a restart of the test but it's still getting the same result. |
Contributor
|
@Bill-Fischofer-Linaro looks like github but to deliver right commit sha to validate. Top level checkpatch check is passed. So it has to be ok. |
Contributor
|
Merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: https://bugs.linaro.org/show_bug.cgi?id=3576
Signed-off-by: Balasubramanian Manoharan bala.manoharan@linaro.org