From patchwork Tue Mar 17 01:42:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Kicinski X-Patchwork-Id: 222425 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AEC97C2BB1D for ; Tue, 17 Mar 2020 01:42:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7E0F1206E2 for ; Tue, 17 Mar 2020 01:42:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584409368; bh=dajjltS70DyT0tGcFX9CImUOD2RAIdlVGDKEpxCSmhY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=w+Q08aYQBlGnniRxfGv/rVvk1SEXl0uYcKF+waQ+TD/QQT3jwJC/KtP3cHtToSz/G jj2KADvkGWXMtGx/U+mkxOxCOgbhL86MabrYYRr7dkiBYiju6mRNtyaJL8NofZR+Xl QXdVGgBN0Ns+hih9kdMBqzwGDWYRTxuL6O9QcrFI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726652AbgCQBmr (ORCPT ); Mon, 16 Mar 2020 21:42:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:46492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726596AbgCQBmr (ORCPT ); Mon, 16 Mar 2020 21:42:47 -0400 Received: from kicinski-fedora-PC1C0HJN.thefacebook.com (unknown [163.114.132.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8EEB420719; Tue, 17 Mar 2020 01:42:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1584409366; bh=dajjltS70DyT0tGcFX9CImUOD2RAIdlVGDKEpxCSmhY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=2FKcCT4yUOLyEnY9Mtf9l9EWT4ipnYLHD7eaTdsx/OR0T2ktTcPhvh+2b1YIfYUfU OTHJojLQOL4AK+ZqX+0kZ2POKrSCC3DeeHAmav/UlGVfl+dn574hG9qslpHfupFnrX 7VQ9x9ulQyUxzfQWzN82lwntpbuhNI28x545xu3c= From: Jakub Kicinski To: davem@davemloft.net, jiri@resnulli.us Cc: netdev@vger.kernel.org, kernel-team@fb.com, ecree@solarflare.com, pablo@netfilter.org, Jakub Kicinski Subject: [PATCH net-next 2/2] nfp: allow explicitly selected delayed stats Date: Mon, 16 Mar 2020 18:42:12 -0700 Message-Id: <20200317014212.3467451-3-kuba@kernel.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200317014212.3467451-1-kuba@kernel.org> References: <20200317014212.3467451-1-kuba@kernel.org> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org NFP flower offload uses delayed stats. Kernel recently gained the ability to specify stats types. Make nfp accept DELAYED stats, not just the catch all "any". Signed-off-by: Jakub Kicinski --- drivers/net/ethernet/netronome/nfp/flower/action.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/netronome/nfp/flower/action.c b/drivers/net/ethernet/netronome/nfp/flower/action.c index 5fb9869f85d7..1c76e1592ca2 100644 --- a/drivers/net/ethernet/netronome/nfp/flower/action.c +++ b/drivers/net/ethernet/netronome/nfp/flower/action.c @@ -1207,7 +1207,8 @@ int nfp_flower_compile_action(struct nfp_app *app, bool pkt_host = false; u32 csum_updated = 0; - if (!flow_action_basic_hw_stats_check(&flow->rule->action, extack)) + if (!flow_action_hw_stats_check(&flow->rule->action, extack, + FLOW_ACTION_HW_STATS_DELAYED_BIT)) return -EOPNOTSUPP; memset(nfp_flow->action_data, 0, NFP_FL_MAX_A_SIZ);