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 1C383A00C3 for ; Fri, 14 Oct 2022 22:37:57 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 14D6C42802; Fri, 14 Oct 2022 22:37:57 +0200 (CEST) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mails.dpdk.org (Postfix) with ESMTP id B89C3400D4 for ; Fri, 14 Oct 2022 22:37:54 +0200 (CEST) Received: by mail-wm1-f47.google.com with SMTP id n16-20020a05600c4f9000b003c17bf8ddecso5937744wmq.0 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=O7ke2vNhnHDw4fVXNbzxprbqSFSAVeo5VKmcJqa5UROeiFTrCJr+z5H1FLPOjgfcm4 8kXszB6vnbfPBfMTzE/rQWKe/jThE5hHznEAq0YaHq+XSKcg3kNqCzfZTZFKnWXVh4sF /5MR1lW1phkBNu/7y6EXRyIYFT2470jVvCk6GxNOCu541M8ekPiWMs9lEYND9KFjtXcR lbtYuU05GDH2b0o7le8JlacRX9LfQ+Nm0D1BMgBLoZ47sQlrZjaai6yJnqSs0eTTjZda TyJDTBbOD0o0zNKM5UMA6gRhLQDaRgvhV9DvKj07gNHA7GCuQIvETwa3SpH46JNxk51q qwcA== X-Gm-Message-State: ACrzQf1/2/4VX3w1lkwuUs4gzFGli0E0G8RASRTc7WyLwLct7BBvkbFq yYtpv3tS165kBJQ0MFZgVjRO7A== 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: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-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