From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7F696A0561; Thu, 18 Mar 2021 12:56:32 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 699FE140E93; Thu, 18 Mar 2021 12:56:32 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 0122C40698; Thu, 18 Mar 2021 12:56:29 +0100 (CET) IronPort-SDR: 5ECdDXY+zWTSczniRVus2jaNcsKAkCSZh0MYnDKHqBeCWxB5OcGu8AmBvqAQKUrjgkoKtIsIYC U4HtGki7CGuQ== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="189033716" X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="189033716" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Mar 2021 04:56:29 -0700 IronPort-SDR: K+j00QU3JGTAYOHgv9GUiddbWlj6gesM9XfNO+8Fyw/pPXQOMMEZeVVzxtV5fQufYomRdRuzDI Gt5yLna6cDvw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,258,1610438400"; d="scan'208";a="606142555" Received: from sivswdev08.ir.intel.com ([10.237.217.47]) by fmsmga005.fm.intel.com with ESMTP; 18 Mar 2021 04:56:27 -0700 From: Konstantin Ananyev To: dev@dpdk.org Cc: cristian.dumitrescu@intel.com, jasvinder.singh@intel.com, Konstantin Ananyev , stable@dpdk.org Date: Thu, 18 Mar 2021 11:56:12 +0000 Message-Id: <20210318115613.5503-1-konstantin.ananyev@intel.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20210316170723.22036-1-konstantin.ananyev@intel.com> References: <20210316170723.22036-1-konstantin.ananyev@intel.com> Subject: [dpdk-dev] [PATCH v2 1/2] examples/qos_sched: fixup colors value overrun X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" '3' is not valid RTE_COLOR_ enum value. Fixes: de3cfa2c9823 ("sched: initial import") Cc: stable@dpdk.org Signed-off-by: Konstantin Ananyev --- examples/qos_sched/app_thread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/qos_sched/app_thread.c b/examples/qos_sched/app_thread.c index dbc878b55..a5f402190 100644 --- a/examples/qos_sched/app_thread.c +++ b/examples/qos_sched/app_thread.c @@ -53,7 +53,7 @@ get_pkt_sched(struct rte_mbuf *m, uint32_t *subport, uint32_t *pipe, *queue = pipe_queue - *traffic_class; /* Color (Destination IP) */ - *color = pdata[COLOR_OFFSET] & 0x03; + *color = pdata[COLOR_OFFSET] % RTE_COLORS; return 0; } -- 2.25.1