Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp232321pxm; Fri, 25 Feb 2022 07:05:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJxTBRmi6WerWT1fi99P5H7W+wODwvpSqcb17NPX6t39+BycGZIO/zPqnlvRxFU3NRe3YIAe X-Received: by 2002:aa7:ca5a:0:b0:410:9259:2e6f with SMTP id j26-20020aa7ca5a000000b0041092592e6fmr7555986edt.105.1645801509329; Fri, 25 Feb 2022 07:05:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645801509; cv=none; d=google.com; s=arc-20160816; b=byTLiqUSVI55WqoMo7fW+lPjv7CBT/GRz7IeEVp/05aSYsp67ASXQMl0WTeyZtMFhH 5tbqHpMEW3MX1gkLgTeUfhWlHg7RONpX7wRcHNE4feG+b1EiznZ2xyB1q6iSZRxBGuZ9 qlBVq87D+8QmYP0xLgjzAIzDSVkEv2ZDLNhFd8nokWH1pBYNS/oLyelL1ULJ3r+Jb4xb YGeP5xH0bJ31uM0Kiha94zREgEfYYAOoOYcZoe/QNOiAbhniLj3SbLBQOCqGDJH8B5La uzbPtyo46A7RGnuhvVrmkEPYLTEAeY0hlEPPEp3EylieY/7tNa/Qg12X4NE/nIfryxNd 6EjA== 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=ukTEVmN3B7Wvv/QbA8NN7LNVV3vx54CmkD3mb6AtZXE=; b=OXbMjQnKN9lgfW5lnsNDqpuQ3M3QJP8NfXyckavgEqKeH0+F7N6yO8s3qHo4zZUXaI +WGvw+MHegByvEgKco/Od8Y1Kw1nr6YyOtue8d2QcfooEM6MByTTlMEh9aO64+YP5Gwh YTgWGAD6cnPAAY8LZiDjANa7BBwmcm+Mx+vkC0l30FrxGB4OyIjLWre5TxO6kxcAdQpA dArj+lM+SDC7XKHlqCE43jpWpp597V+9BjI6avIHRGwxFGAziCI6yUbGJA+sSdwZPU0W DUsaukDOwkzjCH+Vai0opuxV8UagKOFP8D/4l5kRAg9TUCRMk9gkL+4mKaHNJvNa5lWO fjnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=J7YrQhbj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x4-20020a170906298400b006b0d0711b4bsi1799577eje.649.2022.02.25.07.04.42; Fri, 25 Feb 2022 07:05:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@nbd.name header.s=20160729 header.b=J7YrQhbj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239425AbiBYKTL (ORCPT + 99 others); Fri, 25 Feb 2022 05:19:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239390AbiBYKS6 (ORCPT ); Fri, 25 Feb 2022 05:18:58 -0500 Received: from nbd.name (nbd.name [IPv6:2a01:4f8:221:3d45::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 17FC41A806C; Fri, 25 Feb 2022 02:18:27 -0800 (PST) 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=ukTEVmN3B7Wvv/QbA8NN7LNVV3vx54CmkD3mb6AtZXE=; b=J7YrQhbjgIjxKnqzkEr/XgPKe0 qGGvk7m6TRiZIEeE9YkWKWcJI0TqELi3hsmo3A4N4H9bYZpMPLX80xkr5uinziQq5DcuuX4v1Il2W ocapRqqK1zYmWrPzZhBoGDRdTrblmYrOByqTjDGFApR0Wsz30Q3OTra7UqUz0zwcUGX0=; Received: from p200300daa7204f00f847964d075b2b3d.dip0.t-ipconnect.de ([2003:da:a720:4f00:f847:964d:75b:2b3d] helo=localhost.localdomain) by ds12 with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1nNXg2-0007J1-IA; Fri, 25 Feb 2022 11:18:18 +0100 From: Felix Fietkau To: netdev@vger.kernel.org, John Crispin , Sean Wang , Mark Lee , "David S. Miller" , Jakub Kicinski , Matthias Brugger Cc: linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 07/11] net: ethernet: mtk_eth_soc: support TC_SETUP_BLOCK for PPE offload Date: Fri, 25 Feb 2022 11:18:06 +0100 Message-Id: <20220225101811.72103-8-nbd@nbd.name> X-Mailer: git-send-email 2.32.0 (Apple Git-132) In-Reply-To: <20220225101811.72103-1-nbd@nbd.name> References: <20220225101811.72103-1-nbd@nbd.name> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=ham 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.32.0 (Apple Git-132)