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 97015A00C2; Fri, 14 Oct 2022 22:37:56 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 458A8400D4; Fri, 14 Oct 2022 22:37:56 +0200 (CEST) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mails.dpdk.org (Postfix) with ESMTP id B72984003C for ; Fri, 14 Oct 2022 22:37:54 +0200 (CEST) Received: by mail-wm1-f42.google.com with SMTP id iv17so3876693wmb.4 for ; Fri, 14 Oct 2022 13:37:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=0Kc5oDoxvQiigMwus907ewUU/D5y5b4Sxy9aanuGbgQ=; b=i+NFMbihINvYG/J142k1sDUClKETuUG6/cjxADqLGUV7c3veLvV5p5aFb3mxPNFJQr sRabO31D0oPG5oCWRCAL6hSjLo5E+L1uTYZl1zrk9yxaPlWNYrlCSCPN+7ffBU9dvK9q DcowhuJ6szjjnBxAn+FGpmhXNG2kJBCF5/NvhbDWBH2MllOTsWpxA6IIh3ITj0Mglc7F lM9CLY7guZrV+t+t263gyj/RvTRNdnysnorT+jtLCwSvt8g9NBF08+nGXv+0Q6lZHa1r EAPAHBBXLBcb00KBB7u8rpG9OBJXkCjnRPFdjrSZQZIt+0Pg8gMnji+bJZsRWU3vOyk6 /RyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=0Kc5oDoxvQiigMwus907ewUU/D5y5b4Sxy9aanuGbgQ=; b=lSsl6aSCnVRT6Okc2TQYoa/suid8FIlr6sOBgPVEmJ9ADAcGzdi7ygjOzIY0crmxN3 KvJ0v2+MXGmqc/MwNenuHcHaY+xQrg/q+eHE1smjy1bNi6pNEaPbd91ayxcH5aAsIq4E BHgI/8fqT2XWevjDOAohhaTGecmHvyzlFAIEL9983HuNoAWV3y6PqbFfp5gwIjRthe2B AV3gy2qbob4eg7IkcBRZb5/U4WCUQ1qBepMy081Iq6a1Ltw/XuQnxuRL5dTo13WrB2Mi QuAUxYqoAWYepbJSic/XrtSagsnsYKDRhxyKCY/xO7hzuiXxpFkPUU3ec7dVnX5TeAfL Gn/A== X-Gm-Message-State: ACrzQf1sKo1ZSyTruLihE2bjXxmKd6qQXqUAXKw3C5GD4jQKq3KIwezN SB8/0Hnv7sppwHba0Jm9AxdSLRJCpZZIlw== X-Google-Smtp-Source: AMsMyM6NWjy2FcC93dp+UF1QPGlBzj7LvebsmoSZ6NOA5xRVGNOkPIptUbKVkM0OM/XfWiSLmTnkHw== X-Received: by 2002:a05:600c:6019:b0:3c6:e21e:4e9d with SMTP id az25-20020a05600c601900b003c6e21e4e9dmr6599130wmb.53.1665779874459; Fri, 14 Oct 2022 13:37:54 -0700 (PDT) Received: from gojira.dev.6wind.com ([185.13.181.2]) by smtp.gmail.com with ESMTPSA id z12-20020adfe54c000000b0022afedf3c87sm2539653wrm.105.2022.10.14.13.37.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Oct 2022 13:37:53 -0700 (PDT) From: Olivier Matz To: dev@dpdk.org Cc: Harry van Haaren , Bruce Richardson , David Hunt , Anatoly Burakov , =?UTF-8?q?Morten=20Br=C3=B8rup?= , Andrew Rybchenko , stable@dpdk.org Subject: [PATCH 1/2] event/sw: fix missing flow ID init in selftest Date: Fri, 14 Oct 2022 22:37:09 +0200 Message-Id: <20221014203710.6172-1-olivier.matz@6wind.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 The issue is seen by unit tests: > root@dpdk-VF-dut247:~/dpdk# MALLOC_PERTURB_=204 \ > DPDK_TEST=eventdev_selftest_sw \ > /root/dpdk/x86_64-native-linuxapp-gcc/app/test/dpdk-test -c 0xff > (...) > *** Running XStats ID Reset test... > 12: 1761: qid_0_port_2_pinned_flows value , expected 1 got 7 > 1778: qid_0_port_2_pinned_flows value incorrect, expected 1 got 7 > ERROR - XStats ID Reset test FAILED. > SW Eventdev Selftest Failed. > Test Failed The flow id is not set in the event, which results in an undefined flow, whose value depends on what was previously in stack. Having different flows for the packets makes the test to fail, since only one flow is expected. This only happens in -O3, where the same stack area is shared by the event object and the address of the mbuf allocated in rte_gen_arp(). Fix this by properly initializing the flow id. Bugzilla ID: 1101 Fixes: e21df4b062b5 ("test/eventdev: add SW xstats tests") Cc: stable@dpdk.org Signed-off-by: Olivier Matz --- drivers/event/sw/sw_evdev_selftest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/event/sw/sw_evdev_selftest.c b/drivers/event/sw/sw_evdev_selftest.c index ed7ae6a685..4f18d66f36 100644 --- a/drivers/event/sw/sw_evdev_selftest.c +++ b/drivers/event/sw/sw_evdev_selftest.c @@ -1489,6 +1489,7 @@ xstats_id_reset_tests(struct test *t) goto fail; } ev.queue_id = t->qid[i]; + ev.flow_id = 0; ev.op = RTE_EVENT_OP_NEW; ev.mbuf = arp; *rte_event_pmd_selftest_seqn(arp) = i; -- 2.30.2