Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp1012646pxb; Wed, 6 Apr 2022 06:42:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfbd6EHNIhBaKJCz5NrXaNjTp26Q+bRQjvoq3G83lOOib9INi8mHZTFzzLP/lpbPr1aunH X-Received: by 2002:a17:90b:4f8d:b0:1c6:408b:6b0d with SMTP id qe13-20020a17090b4f8d00b001c6408b6b0dmr9882668pjb.90.1649252573381; Wed, 06 Apr 2022 06:42:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649252573; cv=none; d=google.com; s=arc-20160816; b=KCsJRhfHJ8ZIxFwkzPD8Ta4U1UD7EEVh/jAsBbuM2TMIrUWmfoEMnEh7+/HlRGAcac S213akJhh1MNoh5liERUyi90KJlujPO+ZrBo8bppQEW3q+KxO4AYb8z9u6q56Y3AmTy+ YKkwjLhxqSRRFIneY3fb8ls9JnRRgUmNpWUr7h8ZZRwgIjXEojE8C3umuUOeS2grbbAo VjPLPXdPkCOB1ccO5KkzR/75M4WkgEDjuRDVXTEfKiNrBsp0rOg7+KStJ+Ey2lVNBZt5 1dat80T3nkaqT4xfWQBTE271S78ccsy185sVWHEBt6SZNICt6VjIvP+qA65G3VMiReYr z0Lg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=gXvEQrfZY9HNBpxfU0Zzm6NHw+EacTGssl2BnoA7qE0=; b=lMSyGh6OEob1oMa3bq9BdOKfEOm1Riv4U+EZhuTHo1QZCBixBUVwaN60qsLCYajeZl G/74++jc0RdfPTcLXNuBj6CoPJBL8FEJpdsdmvGpQvUmBVYQCAyELDUX43LAwNL/M0gv OJ3CMDfLeTddLUqw2hmvNJbtJJm9x7WuThNqVlRwbp8wPg9u4E+KK1FZAJNvwGUiafKH pP0ug9zkBuLxCU6DcXPKsCtzRvXRw+lvJuXK01iBuk2/4n5yGB100OTlg90VvNNXyPgl USEzBhjCSULDf+RXLsPzCa8Ara1U/Yk/FVkzRmX74ieFgIjpM9cYO+DRlegOltBYZvk0 q8yg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b="J/ymy3Uq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id q26-20020a638c5a000000b003816043ee4csi16218274pgn.65.2022.04.06.06.42.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 06:42:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b="J/ymy3Uq"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6EA0F60ED10; Wed, 6 Apr 2022 04:33:28 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1848433AbiDFCWx (ORCPT + 99 others); Tue, 5 Apr 2022 22:22:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37656 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358894AbiDEUuG (ORCPT ); Tue, 5 Apr 2022 16:50:06 -0400 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8616966ADB; Tue, 5 Apr 2022 13:24:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbd.name; s=20160729; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=gXvEQrfZY9HNBpxfU0Zzm6NHw+EacTGssl2BnoA7qE0=; b=J/ymy3Uqmx90f5JQAtw03vc9mI argCvDrmevWZn0QJBD+TAfBEovMmoU9fFQtdxBxq/MuDi7lA885JpmqN346nTYSu/rGDeO9+1Zpyw snXS5Ep9sk87UP6kj0wY6cSoPwMkT3ONEZH/30dNvKHuzbFEnFn/3KOY5I0HKFEj2iJQ=; Received: from p200300daa70ef200456864e8b8d10029.dip0.t-ipconnect.de ([2003:da:a70e:f200:4568:64e8:b8d1:29] helo=Maecks.lan) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1nbpJX-00035V-7B; Tue, 05 Apr 2022 21:58:07 +0200 From: Felix Fietkau To: netdev@vger.kernel.org, John Crispin , Sean Wang , Mark Lee , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Matthias Brugger Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 10/14] net: ethernet: mtk_eth_soc: support TC_SETUP_BLOCK for PPE offload Date: Tue, 5 Apr 2022 21:57:51 +0200 Message-Id: <20220405195755.10817-11-nbd@nbd.name> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405195755.10817-1-nbd@nbd.name> References: <20220405195755.10817-1-nbd@nbd.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This allows offload entries to be created from user space Signed-off-by: Felix Fietkau --- drivers/net/ethernet/mediatek/mtk_ppe_offload.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c index 0113cddcebf4..da3bc93676f8 100644 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c @@ -563,10 +563,13 @@ mtk_eth_setup_tc_block(struct net_device *dev, struct flow_block_offload *f) int mtk_eth_setup_tc(struct net_device *dev, enum tc_setup_type type, void *type_data) { - if (type == TC_SETUP_FT) + switch (type) { + case TC_SETUP_BLOCK: + case TC_SETUP_FT: return mtk_eth_setup_tc_block(dev, type_data); - - return -EOPNOTSUPP; + default: + return -EOPNOTSUPP; + } } int mtk_eth_offload_init(struct mtk_eth *eth) -- 2.35.1