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 1D727A054F; Tue, 16 Mar 2021 18:07:44 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 99FF0406A2; Tue, 16 Mar 2021 18:07:43 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id E8A544069F; Tue, 16 Mar 2021 18:07:41 +0100 (CET) IronPort-SDR: BeaBtOKar2gwsFbPygt+ePbQtVvzP6r+jrynPAIFQ/HcyhEPIgcFcveLhEFW+QOi9ssAo60kZl pMivVHXYazJQ== X-IronPort-AV: E=McAfee;i="6000,8403,9925"; a="189348314" X-IronPort-AV: E=Sophos;i="5.81,254,1610438400"; d="scan'208";a="189348314" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2021 10:07:38 -0700 IronPort-SDR: cB0uxfMM15wfHFmdooAHWpW6SuxmzltRzziX6R66kzhEQzda/y6Xahk0Sd1t9e5kftttlQdj77 abM0fDR61WIg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,254,1610438400"; d="scan'208";a="440146179" Received: from sivswdev08.ir.intel.com ([10.237.217.47]) by FMSMGA003.fm.intel.com with ESMTP; 16 Mar 2021 10:07:37 -0700 From: Konstantin Ananyev To: dev@dpdk.org Cc: cristian.dumitrescu@intel.com, jasvinder.singh@intel.com, Konstantin Ananyev , stable@dpdk.org Date: Tue, 16 Mar 2021 17:07:22 +0000 Message-Id: <20210316170723.22036-1-konstantin.ananyev@intel.com> X-Mailer: git-send-email 2.18.0 Subject: [dpdk-dev] [PATCH 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 dbc878b553..a5f402190c 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.26.2