From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D5036A0565; Tue, 10 Mar 2020 10:49:33 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5FD461C0B8; Tue, 10 Mar 2020 10:49:01 +0100 (CET) Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id 5D4B41C030; Tue, 10 Mar 2020 10:48:50 +0100 (CET) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mx1-us2.ppe-hosted.com (PPE Hosted ESMTP Server) with ESMTPS id 40A5C28006E; Tue, 10 Mar 2020 09:48:49 +0000 (UTC) Received: from ukex01.SolarFlarecom.com (10.17.10.4) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 10 Mar 2020 09:48:44 +0000 Received: from opal.uk.solarflarecom.com (10.17.10.1) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 10 Mar 2020 09:48:44 +0000 Received: from ukv-loginhost.uk.solarflarecom.com (ukv-loginhost.uk.solarflarecom.com [10.17.10.39]) by opal.uk.solarflarecom.com (8.13.8/8.13.8) with ESMTP id 02A9mjBF008741; Tue, 10 Mar 2020 09:48:45 GMT Received: from ukv-loginhost.uk.solarflarecom.com (localhost [127.0.0.1]) by ukv-loginhost.uk.solarflarecom.com (Postfix) with ESMTP id 28A051613C5; Tue, 10 Mar 2020 09:48:45 +0000 (GMT) From: Andrew Rybchenko To: CC: Igor Romanov , Date: Tue, 10 Mar 2020 09:48:37 +0000 Message-ID: <1583833719-6597-4-git-send-email-arybchenko@solarflare.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1583833719-6597-1-git-send-email-arybchenko@solarflare.com> References: <1583833719-6597-1-git-send-email-arybchenko@solarflare.com> MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-Product-Ver: SMEX-12.5.0.1300-8.5.1020-25280.003 X-TM-AS-Result: No-4.006600-8.000000-10 X-TMASE-MatchedRID: 8R2AaUgjr68SxJyM7XJzcg/5L1pUR3v2eouvej40T4gZwGrh4y4izGdC uMvHMJPkK8fWbFGReKyPQi9XuOWoOIRB5esBRb+nboe6sMfg+k9QYo4xNF42Pi2QO02vY1BNo8W MkQWv6iUCY+lsYFiWG+TCMddcL/gjro1URZJFbJucszSWB8ppZ43KitJwD5+NwCputGLaYmq5wk xp7xvkUYp+FzlnPdU7ReREpSDgFHIQfsRZv7DwXFvTRQI2pZz6JubGgZFxgtzw7JxwU0EvZMqER OLb/+yO4/0Jvn0rwAJmtL4Dw+zNb5hXfxzgoU6P X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--4.006600-8.000000 X-TMASE-Version: SMEX-12.5.0.1300-8.5.1020-25280.003 X-MDID: 1583833729-EDNGXRDpXS-u Subject: [dpdk-dev] [PATCH 3/5] net/sfc/base: reject automatic filter creation by users X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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" From: Igor Romanov The automatic filter priority may only be used by filter implementation, so reject the attempts to create such filters by client drivers. Fixes: f9565517ff4f ("net/sfc/base: import filters support") Cc: stable@dpdk.org Signed-off-by: Igor Romanov Signed-off-by: Andrew Rybchenko --- drivers/net/sfc/base/efx_filter.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/sfc/base/efx_filter.c b/drivers/net/sfc/base/efx_filter.c index 575f6228b..36332a280 100644 --- a/drivers/net/sfc/base/efx_filter.c +++ b/drivers/net/sfc/base/efx_filter.c @@ -93,8 +93,15 @@ efx_filter_insert( goto fail2; } + if (spec->efs_priority == EFX_FILTER_PRI_AUTO) { + rc = EINVAL; + goto fail3; + } + return (efop->efo_add(enp, spec, B_FALSE)); +fail3: + EFSYS_PROBE(fail3); fail2: EFSYS_PROBE(fail2); fail1: -- 2.17.1