From patchwork Tue Feb 2 00:24:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Hyong Youb Kim (hyonkim)" X-Patchwork-Id: 87600 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 A9DE4A0A0B; Tue, 2 Feb 2021 01:24:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4779E24021A; Tue, 2 Feb 2021 01:24:41 +0100 (CET) Received: from alln-iport-6.cisco.com (alln-iport-6.cisco.com [173.37.142.93]) by mails.dpdk.org (Postfix) with ESMTP id A643C240218; Tue, 2 Feb 2021 01:24:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=1135; q=dns/txt; s=iport; t=1612225479; x=1613435079; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=Fcf+gV3XuXzrtMZIn798K2MR2E4S4dj1HyKLHm76qCI=; b=GfhRGQ1IuaV+210e8ZKmm5adW0XCr6/IBlkX2W0HnD+u3i4pyamEduc7 Vs7A2sgL1PUS0GPmcgSxsob2tblYb1ja7d/jE+JJHcSpKBk/ILIES+52K aYXl/eQtIonwzmIqd1elWjchYQ7QWFgb06daQ+T9dl8awQ82WGDv90GBF I=; X-IronPort-AV: E=Sophos;i="5.79,393,1602547200"; d="scan'208";a="679067798" Received: from rcdn-core-9.cisco.com ([173.37.93.145]) by alln-iport-6.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 02 Feb 2021 00:24:38 +0000 Received: from cisco.com (savbu-usnic-a.cisco.com [10.193.184.48]) by rcdn-core-9.cisco.com (8.15.2/8.15.2) with ESMTP id 1120OcxW019748; Tue, 2 Feb 2021 00:24:38 GMT Received: by cisco.com (Postfix, from userid 508933) id DD9EB20F2005; Mon, 1 Feb 2021 16:24:37 -0800 (PST) From: Hyong Youb Kim To: Ferruh Yigit Cc: dev@dpdk.org, Hyong Youb Kim , stable@dpdk.org, John Daley Date: Mon, 1 Feb 2021 16:24:23 -0800 Message-Id: <20210202002423.954-1-hyonkim@cisco.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Outbound-SMTP-Client: 10.193.184.48, savbu-usnic-a.cisco.com X-Outbound-Node: rcdn-core-9.cisco.com Subject: [dpdk-dev] [PATCH] net/enic: fix the filter type used for flow API 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 Sender: "dev" The filter type (struct filter_v2.type) should always be set to FILTER_DPDK_1, when advanced filtering is enabled in firmware. Otherwise, for some old firmware versions, the driver sets it to FILTER_USNIC_IP, and attempts to install filters fail. This behavior matches that of the now-removed flow director implementation (enic_clsf.c). Fixes: 26faa126d87e ("net/enic: flow API for NICs with advanced filters disabled") Cc: stable@dpdk.org Signed-off-by: Hyong Youb Kim Reviewed-by: John Daley --- drivers/net/enic/enic_flow.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/enic/enic_flow.c b/drivers/net/enic/enic_flow.c index 97ee7509ce..7eb06f889e 100644 --- a/drivers/net/enic/enic_flow.c +++ b/drivers/net/enic/enic_flow.c @@ -1598,6 +1598,8 @@ enic_flow_parse(struct rte_eth_dev *dev, return -rte_errno; } enic_filter->type = enic->flow_filter_mode; + if (enic->adv_filters) + enic_filter->type = FILTER_DPDK_1; ret = enic_copy_filter(pattern, enic_filter_cap, enic, enic_filter, error); return ret;