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 E985E46183 for ; Mon, 3 Feb 2025 16:00:13 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C899E40265; Mon, 3 Feb 2025 16:00:12 +0100 (CET) Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) by mails.dpdk.org (Postfix) with ESMTP id D0DCD40264 for ; Mon, 3 Feb 2025 16:00:11 +0100 (CET) Received: by mail-lf1-f53.google.com with SMTP id 2adb3069b0e04-540201cfedbso4180728e87.3 for ; Mon, 03 Feb 2025 07:00:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1738594811; x=1739199611; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=0fwbBu96ROvu+UYx3+ixV1r5SeG0nTLygWlB+lYWnN0=; b=YHrvTFkX11BdDeh2UA4vBhtOzGjcsM4hZZ72qB/zuVxG2m4o8/Ukx1kxyPCZpstmNc 7886yjiuN6gMPdbFB1Dx2dzqzYck7ei2rFc7L7DPanP1SNremjlrB7M6rAC+kKlHIWZQ j+QkTKicMTkjkKjn3I14A2ggXk5pvO/jBmKLQ9Fj4RfvV+zlx4ZEx3znamGcFLhOU+qo P8MRAdSYXDHJp3xOkja6k1ROxgZseDiH1AjPLNtFKcARafzl9xZ9qKUUe7P3Xdw94EiH sbuqCbV/GTBBnjLVWXX6jKbDniq9RirUti48y3dZ2rHrOuVIiw3gJ8MnRsOu5SL25G0/ iyUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738594811; x=1739199611; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0fwbBu96ROvu+UYx3+ixV1r5SeG0nTLygWlB+lYWnN0=; b=cqYQntyYIc0BvtfrhFBbhH8iO+m/Ue+I1ihHjtODP08mJ2HPwidRlz2V4dLUkZ8ab1 IeC3H4kqyDtYxB3RFf2z8AJebkf6gj5OPmaZa58bEvPXK06VWzHcIC8tp1OiBJlWjjpK VuEuo8Bf5XujHtKCmIybAfmf+iBeDuSELwMdZmgqJKFfjimum8uuQEcAXKRYwEKplk7R x00Ln1HaC3BaMnMLMq8dxBx11Fl2oo56XN6rsu8IwY+BNQocJs6mOUTbV86EHMPF5G9j 6voHCv8ok/ZFreL2Xvn9s3KwtUd0pDURHHfs+60QJSoSdC5JNKzMzH5Fci1Yqm8FmVg6 TrJA== X-Gm-Message-State: AOJu0YzSufa0vryv0GHZZtCnA5jyM52hB2bU6m3Gi8Sj7vh1YJO/1inn QwOYG58ZxaNhlAM434etUQMzP51N08gp8J/jFpW7Ut4lZJNCbH8r X-Gm-Gg: ASbGncvmrS3lfd7LQnwrjvdyDrlFCVoB/SshDHRpLt7NeFBIeLqI4eNPFZoa2VzHlRK DHPZ1imLtl+6KGFlBqQQSUSB7yLs2L7z7NeVQAV75clQWXRSk9NIFp4S+f2gk8LgKNAv0Zsi+uV jGYGQchtcyTslWOlMdMhjn85U+RL3em5yl1gRMcqG/bq5o/d3u9vbOCUXJRzRy0rlsOUcdX5G8q 5zViYS0NxIwKQF4xYMpdDsmzohIGGmh8GrINPZ9WeUWwWLlyiuxCFJ5QwG1GDm1aoHdchI9/rO4 zUMYqhgVJcftTBGUcsD878nB+0QyaeZbBnMAq9A9g3FAuBfUHXmG0wvzURqgYKo= X-Google-Smtp-Source: AGHT+IFUpq7i5pzmtqleX5U/QJ6M9x8L46B4pVzpsFJEOi6mDNROpZwllyxSBdnKZT9/iNf07UjH8w== X-Received: by 2002:a05:6512:1089:b0:542:6d01:f54d with SMTP id 2adb3069b0e04-543e4be0064mr7946074e87.3.1738594810813; Mon, 03 Feb 2025 07:00:10 -0800 (PST) Received: from sovereign (broadband-109-173-43-194.ip.moscow.rt.ru. [109.173.43.194]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-543ebe10379sm1345900e87.72.2025.02.03.07.00.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Feb 2025 07:00:10 -0800 (PST) Date: Mon, 3 Feb 2025 18:00:07 +0300 From: Dmitry Kozlyuk To: Sid ali cherrati Cc: users@dpdk.org Subject: Re: DPDK Flow Filtering Not Working as Expected Message-ID: <20250203180007.2c5e0607@sovereign> In-Reply-To: References: <20250128214616.3f9324de@sovereign> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org 2025-02-03 14:51 (UTC+0100), Sid ali cherrati: > [...] > if (!rte_flow_validate(port_id, &attr, pattern, actions, &error)){ > flow = rte_flow_create(port_id, &attr, pattern, actions, &error); > } > > if(flow != 0){ > printf("Filed to create drop flow filter \n"); > return -1; > } > [...] > The issue is that when I implement this, I get an error on the drop filter: > "Failed to create rule." Do you have any idea why this might be happening? There is no this exact error text in your code or DPDK, I assume we're talking about the quoted fragment. `flow` is a pointer, the correct error condition is `if (flow == NULL)`, so your code probably misinterprets success as error. Also `flow` is not assigned if `rte_flow_validate()` returns non-0.