diff mbox series

[v1,1/1] fix: cls: invalid queue check for hash queues

Message ID 1516348808-27537-2-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [v1,1/1] fix: cls: invalid queue check for hash queues | expand

Commit Message

Github ODP bot Jan. 19, 2018, 8 a.m. UTC
From: Balasubramanian Manoharan <bala.manoharan@linaro.org>


Fixes: https://bugs.linaro.org/show_bug.cgi?id=3577

Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>

---
/** Email created from pull request 407 (bala-manoharan:BUG3577)
 ** https://github.com/Linaro/odp/pull/407
 ** Patch: https://github.com/Linaro/odp/pull/407.patch
 ** Base sha: 5a4502fc6bc53e6503169da3028f456b64811a0b
 ** Merge commit sha: 44787dd87795aff72073b66dd3ec20adec800536
 **/
 platform/linux-generic/odp_classification.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/odp_classification.c b/platform/linux-generic/odp_classification.c
index 276430923..d97807df0 100644
--- a/platform/linux-generic/odp_classification.c
+++ b/platform/linux-generic/odp_classification.c
@@ -979,8 +979,10 @@  int cls_classify_packet(pktio_entry_t *entry, const uint8_t *base,
 	if (cos == NULL)
 		return -EINVAL;
 
-	if (cos->s.queue == ODP_QUEUE_INVALID ||
-	    cos->s.pool == ODP_POOL_INVALID)
+	if (cos->s.queue == ODP_QUEUE_INVALID && cos->s.num_queue == 1)
+		return -EFAULT;
+
+	if (cos->s.pool == ODP_POOL_INVALID)
 		return -EFAULT;
 
 	*pool = cos->s.pool;