From patchwork Thu May 2 21:31:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Hemminger X-Patchwork-Id: 139814 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 336A443F6C; Thu, 2 May 2024 23:36:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CF538402D4; Thu, 2 May 2024 23:36:31 +0200 (CEST) Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com [209.85.210.177]) by mails.dpdk.org (Postfix) with ESMTP id E395E402C4 for ; Thu, 2 May 2024 23:36:29 +0200 (CEST) Received: by mail-pf1-f177.google.com with SMTP id d2e1a72fcca58-6f44b296e02so106297b3a.2 for ; Thu, 02 May 2024 14:36:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1714685789; x=1715290589; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=eq2wjKbUvH3JgrT7fyod+qY04dohCGMAeteHnDtsFJ0=; b=PM9Wqza/CgS8rOz1ieQL+LBnX9LISSmwmUU5QpW1/JIdOCBlrfkFtCri8QD0eKSeAn Ftvcrmd/Z4jLyBpHnSTPFRBedoHfWmVvU9fN5VANQlicw7VtQcZ7cO9pMI+yM/CLHWwv qV2XyW0zpAie0CcyRnfY/bgNku+qLtfP5TG4KNKa5pccjpdRKAvJHX82E9bJkUg17q2K wZoSnxS8RzXmATik51WhuqZhwBq7TLFBnXKdubg2daTAcfKYDIOw/ch1autXttsRJ7mI b+EW7ZW7F1/zc4OhR6ptlpVLVbqZiWnR1/KkocPl3NoCh9b3R0BIl1lyILgdDaYZPZN9 q2mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714685789; x=1715290589; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eq2wjKbUvH3JgrT7fyod+qY04dohCGMAeteHnDtsFJ0=; b=S3SKUU1KES4vC8oplS0FmL+wMcpm1I8FUxj0zog9ClklsrRAuKtBHA2PXEcEfHhWEq R9XFHeEKq4cAeAAHkAbG98+UFweWDvHlZTW/HCLUQP7ccuDi26AUJ5z1xN38wn/NlUON cwRg7vmkxELibXKm4jRmb6k/TIXviO0jQQR6xR974bhVdHmXvp3mCaSTtendgG8WMqQ2 +mpHmmBQokNDSbybdq+Ob3scdj2kSstC3hot5ZwfKM42kep7XdBcIyvEOBkDAupDZ5G3 hWXMh/ZN1Snxb7EQf6KIHja2M5Bi+eGuJKB3cxJVwv2Tti1N69miYdUmaeRKcQ9JuVoM m8Tw== X-Gm-Message-State: AOJu0Ywaq51gGGOMpq4FrVqNbvXn6vig327jd6wN6xH6e4fzla/FMJHR mGPZV9RWeCDxKTmTswdFCwkzDjaSMk9dPX9NEHYyZ2GZI2liYnrviLgtXceARX0p+5ApV+speug BBMRmQA== X-Google-Smtp-Source: AGHT+IG2D4n3WD70XXfrEZ/EWfMyu7ARLqxa0ySfVzb3az2ZtjXGeVi917Rz4Ww0xKJ7WeMS7TJlBw== X-Received: by 2002:a05:6a21:7897:b0:1aa:6613:2387 with SMTP id bf23-20020a056a21789700b001aa66132387mr1112441pzc.47.1714685788954; Thu, 02 May 2024 14:36:28 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id f14-20020a056a001ace00b006f3eee787d5sm1804829pfv.18.2024.05.02.14.36.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 14:36:28 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Subject: [PATCH v12 01/12] net/tap: fix fd check in flow_isolate Date: Thu, 2 May 2024 14:31:37 -0700 Message-ID: <20240502213618.11391-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240502213618.11391-1-stephen@networkplumber.org> References: <20240130034925.44869-1-stephen@networkplumber.org> <20240502213618.11391-1-stephen@networkplumber.org> MIME-Version: 1.0 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 check for receive queue fd in flow_isolate is incorrect. If queue has not been setup then fd will be -1 not 0. Signed-off-by: Stephen Hemminger --- drivers/net/tap/tap_flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c index fa50fe45d7..79cd6a12ca 100644 --- a/drivers/net/tap/tap_flow.c +++ b/drivers/net/tap/tap_flow.c @@ -1595,7 +1595,7 @@ tap_flow_isolate(struct rte_eth_dev *dev, * If netdevice is there, setup appropriate flow rules immediately. * Otherwise it will be set when bringing up the netdevice (tun_alloc). */ - if (!process_private->rxq_fds[0]) + if (process_private->rxq_fds[0] == -1) return 0; if (set) { struct rte_flow *remote_flow;