From patchwork Sun Mar 19 06:00:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Auhagen X-Patchwork-Id: 13180209 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C7CAFC7618A for ; Sun, 19 Mar 2023 06:00:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229898AbjCSGA6 (ORCPT ); Sun, 19 Mar 2023 02:00:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229541AbjCSGA5 (ORCPT ); Sun, 19 Mar 2023 02:00:57 -0400 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2109.outbound.protection.outlook.com [40.107.13.109]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F03A22034 for ; Sat, 18 Mar 2023 23:00:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OTmczPs7FApMDh0Bhk3ec0/1YumOXKay4gc8bK8zNL0JHk3t3WhURKNnEI5jmUal3PmocPsuHtrUMsOrnECeqP7TH+B37Y/x1W9wpZ5r6adNvvIzC+iNQKY3WkvuDDcj7dzTCeKjMZUKD8ZKrI/qwIsgusWZsh869jme8PK02UkKUHO+UBuoJeQPLGWC9Lr15P0CV1j7nb2RwBlmLGqCPe42TLgLrke6AlOlUckr7DS24hiCBpzsC3ONPV3pa3AP4FlVKvzdcSnhlw2Z9+4iviAZZC1FIP9WRvzAGKt1DjwghSN+v/Y7DoXDlN1776D6caQ7sGmJ9JBLHpSAipMolw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=4uOsGv6hhmH+RtGSsQUBb7N4UfUvJ/egTT6pIvLXncE=; b=XH39DzYeHr2VvBCrgP+q8Muk8uPHSgzZGycLZyM2kwb43mpKABPpOUfonZ2bVkE/pnwtPojrHqyd23HYXhhKbkCP44Dgg8NknqODBk36FOkWMedncBgpiVJxKytVURxkFFg3vlyfBGPRntuZjyJ0ucXIdsvaWPDc0YkpHHuwqtpyVX0gWUQfpbsL500s2XoKzxoo3Bc8Zcb3Hi/wtiVVz7tLhcmhPrMN0DmRf9UfB13VwrEiD9AdtS0E4TbJiYNCHgbRE4d7eGlSoE4pmnH1j2dLp6sW5sP42R8xhMl5z3nEzY+SBxogCItlRD/tSU7cKPO+iYL42YR/x6gqZNBPqA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=voleatech.de; dmarc=pass action=none header.from=voleatech.de; dkim=pass header.d=voleatech.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=voleatech.de; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4uOsGv6hhmH+RtGSsQUBb7N4UfUvJ/egTT6pIvLXncE=; b=f8HVm83vXO7gmfrddqT3+T6AhDQ8mrtnQQNYkzNCEY4/UM4rMWTqK8PTFYt11+mjk9ftB6GymP3DeX32EyhO/Id33jLkUAELJkSb02WD5QbExiEOqUfbnSIXAIbipJb/Yn3K/PexzQCJCuE3m5UuWb6VhWZuJTJI3r1hfMhE2KE= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=voleatech.de; Received: from AM9PR05MB8857.eurprd05.prod.outlook.com (2603:10a6:20b:438::20) by DB4PR05MB10392.eurprd05.prod.outlook.com (2603:10a6:10:3cf::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.36; Sun, 19 Mar 2023 06:00:51 +0000 Received: from AM9PR05MB8857.eurprd05.prod.outlook.com ([fe80::3fdc:3007:ffee:3c4d]) by AM9PR05MB8857.eurprd05.prod.outlook.com ([fe80::3fdc:3007:ffee:3c4d%9]) with mapi id 15.20.6178.037; Sun, 19 Mar 2023 06:00:45 +0000 Date: Sun, 19 Mar 2023 07:00:38 +0100 From: Sven Auhagen To: netdev@vger.kernel.org Cc: mw@semihalf.com, linux@armlinux.org.uk, kuba@kernel.org, davem@davemloft.net, maxime.chevallier@bootlin.com Subject: [PATCH v2 1/3] net: mvpp2: classifier flow fix fragmentation flags Message-ID: <20230319060038.t2s7abqs4umelcr4@Svens-MacBookPro.local> Content-Disposition: inline X-ClientProxiedBy: FR3P281CA0061.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:4b::9) To AM9PR05MB8857.eurprd05.prod.outlook.com (2603:10a6:20b:438::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR05MB8857:EE_|DB4PR05MB10392:EE_ X-MS-Office365-Filtering-Correlation-Id: 0ba4c34a-731b-4ed3-4258-08db283f47d8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: uHYEo+dqeq/qO7jOky7b1RGgBuZZK1w5oKKJvw0T/YxMQrThlLP0QEEdUhBlY9363XTi8R3k7bX1rvVm0vd6kTy+krCpg/xGPk8izm+7+bVVdMHI+WDLb45LC2ZBoCTTrTeVjTAPCWypTwFTPGWI8qkDvtEnETgC1UGbQascf8XnuLi+akY1G7J282H8xUrJYNnOtr6ET8GeBJZKLS1/9v2y/tSxt1iaMILi/yjlXn0rf5jYEQgS4PMas23bLEbQIr54EMqB16luU882xiOuh8uBFn6AxaLpSUPbEuuihRGwfUh0Qzlgt9pkm5LLlvNeMs2Mif6kg3VBVXQVnPEZFZ63fI0pRSZAmEf+jX9SnrKbSQmIcwT3kI/DaGz1enScu6PN0sbu179R+RvCSLZ2N4cmvhaNiMK3XLegpgL99homnuWBh0gbOnSmFaI2x4+5Tl7mf+EdvAnepalNTVNM1XPjIoOG5D3R5ztLdwRR30cK4Q8KpUyotInmO2JlPUXjpTRDCbAgBQ+nabmTN1GrUSn/uVJq2CFTeZ23GReh/R3j+d+0pwcTigt6bhK++R8UUhP8V40b9uaOhGmLYeJHHnJPY5T/gtnxSfk/3YgB72RNvnoP/lipq74fKYPuYmi8MOexxAMRJA9jCEQ2DVKyYA== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR05MB8857.eurprd05.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(39830400003)(136003)(366004)(396003)(376002)(346002)(451199018)(86362001)(316002)(2906002)(8936002)(41300700001)(5660300002)(4326008)(66476007)(8676002)(66556008)(478600001)(6916009)(66946007)(38100700002)(6666004)(9686003)(6506007)(26005)(6486002)(186003)(6512007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /CyEuQhRfRv+krgHiOsZmal4B962kd9Rwk6K9VXZ1+YCCNAgZjo9djLuguhwP3LvwUtWnnGeIXvtkz3FikaKgKerBkMwZ+178+vZbJ/G922SUzM7w4O72LeTmNuip1rRq5TfiU6185szvHCd/eiIABoKP36fwuEXlFqJAK8/F7hv5qUnzpYY92iyrOPiAri700rok3N31aMJbIz7VsQCVt6Jz9Jx6cNzKLVEYlQ7J3J+VLirw+JiG4BKVFdx+VNvxOJGalBIdPQoErp6sjkdyQcwhyq/o/MnEATrcGMBDROTQrqsZGj+LI+n3FYLYjp+gtsk3w8IUIvx5+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kHSIpaXyEVP01c1vJFNQxYpGnP0WUsI2YuPQN2xsPkMwmDWwqs7SH4VKsPpX7hcZg/nMOUu+Yrn4pL8hVAOoYDMfr2ogelXFROVdTAQ4NG+Gcr5+HfO6horxseZplB5NFX6rCx8K7JuzKpi4B6/4dsPo+w17z88rjFshHnXTT7f8wr0ggn8CqrLpuGF9gQCYsg4jFCY3mUyt3J9YY0lQSNg== X-OriginatorOrg: voleatech.de X-MS-Exchange-CrossTenant-Network-Message-Id: 0ba4c34a-731b-4ed3-4258-08db283f47d8 X-MS-Exchange-CrossTenant-AuthSource: AM9PR05MB8857.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2023 06:00:45.7868 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b82a99f6-7981-4a72-9534-4d35298f847b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: EgufmvDbJP/OoZorks7RLttTVJ6iPAtlMWCsw6Vk3ptIP/oGrlFOdmyHT1a8/hRRBuhDgWisdcojPuozr6HtU5UihUqMtfuQtBzoFBCiRcY= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR05MB10392 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Add missing IP Fragmentation Flag. Change from v1: * Added the fixes tag * Drop the MVPP22_CLS_HEK_TAGGED change from the patch Fixes: f9358e12a0af ("net: mvpp2: split ingress traffic into multiple flows") Signed-off-by: Sven Auhagen diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c index 41d935d1aaf6..40aeaa7bd739 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_cls.c @@ -62,35 +62,38 @@ static const struct mvpp2_cls_flow cls_flows[MVPP2_N_PRS_FLOWS] = { MVPP2_DEF_FLOW(MVPP22_FLOW_TCP4, MVPP2_FL_IP4_TCP_FRAG_UNTAG, MVPP22_CLS_HEK_IP4_2T, MVPP2_PRS_RI_VLAN_NONE | MVPP2_PRS_RI_L3_IP4 | - MVPP2_PRS_RI_L4_TCP, + MVPP2_PRS_RI_IP_FRAG_TRUE | MVPP2_PRS_RI_L4_TCP, MVPP2_PRS_IP_MASK | MVPP2_PRS_RI_VLAN_MASK), MVPP2_DEF_FLOW(MVPP22_FLOW_TCP4, MVPP2_FL_IP4_TCP_FRAG_UNTAG, MVPP22_CLS_HEK_IP4_2T, MVPP2_PRS_RI_VLAN_NONE | MVPP2_PRS_RI_L3_IP4_OPT | - MVPP2_PRS_RI_L4_TCP, + MVPP2_PRS_RI_IP_FRAG_TRUE | MVPP2_PRS_RI_L4_TCP, MVPP2_PRS_IP_MASK | MVPP2_PRS_RI_VLAN_MASK), MVPP2_DEF_FLOW(MVPP22_FLOW_TCP4, MVPP2_FL_IP4_TCP_FRAG_UNTAG, MVPP22_CLS_HEK_IP4_2T, MVPP2_PRS_RI_VLAN_NONE | MVPP2_PRS_RI_L3_IP4_OTHER | - MVPP2_PRS_RI_L4_TCP, + MVPP2_PRS_RI_IP_FRAG_TRUE | MVPP2_PRS_RI_L4_TCP, MVPP2_PRS_IP_MASK | MVPP2_PRS_RI_VLAN_MASK), /* TCP over IPv4 flows, fragmented, with vlan tag */ MVPP2_DEF_FLOW(MVPP22_FLOW_TCP4, MVPP2_FL_IP4_TCP_FRAG_TAG, MVPP22_CLS_HEK_IP4_2T | MVPP22_CLS_HEK_TAGGED, - MVPP2_PRS_RI_L3_IP4 | MVPP2_PRS_RI_L4_TCP, + MVPP2_PRS_RI_L3_IP4 | MVPP2_PRS_RI_IP_FRAG_TRUE | + MVPP2_PRS_RI_L4_TCP, MVPP2_PRS_IP_MASK), MVPP2_DEF_FLOW(MVPP22_FLOW_TCP4, MVPP2_FL_IP4_TCP_FRAG_TAG, MVPP22_CLS_HEK_IP4_2T | MVPP22_CLS_HEK_TAGGED, - MVPP2_PRS_RI_L3_IP4_OPT | MVPP2_PRS_RI_L4_TCP, + MVPP2_PRS_RI_L3_IP4_OPT | MVPP2_PRS_RI_IP_FRAG_TRUE | + MVPP2_PRS_RI_L4_TCP, MVPP2_PRS_IP_MASK), MVPP2_DEF_FLOW(MVPP22_FLOW_TCP4, MVPP2_FL_IP4_TCP_FRAG_TAG, MVPP22_CLS_HEK_IP4_2T | MVPP22_CLS_HEK_TAGGED, - MVPP2_PRS_RI_L3_IP4_OTHER | MVPP2_PRS_RI_L4_TCP, + MVPP2_PRS_RI_L3_IP4_OTHER | MVPP2_PRS_RI_IP_FRAG_TRUE | + MVPP2_PRS_RI_L4_TCP, MVPP2_PRS_IP_MASK), /* UDP over IPv4 flows, Not fragmented, no vlan tag */ @@ -132,35 +135,38 @@ static const struct mvpp2_cls_flow cls_flows[MVPP2_N_PRS_FLOWS] = { MVPP2_DEF_FLOW(MVPP22_FLOW_UDP4, MVPP2_FL_IP4_UDP_FRAG_UNTAG, MVPP22_CLS_HEK_IP4_2T, MVPP2_PRS_RI_VLAN_NONE | MVPP2_PRS_RI_L3_IP4 | - MVPP2_PRS_RI_L4_UDP, + MVPP2_PRS_RI_IP_FRAG_TRUE | MVPP2_PRS_RI_L4_UDP, MVPP2_PRS_IP_MASK | MVPP2_PRS_RI_VLAN_MASK), MVPP2_DEF_FLOW(MVPP22_FLOW_UDP4, MVPP2_FL_IP4_UDP_FRAG_UNTAG, MVPP22_CLS_HEK_IP4_2T, MVPP2_PRS_RI_VLAN_NONE | MVPP2_PRS_RI_L3_IP4_OPT | - MVPP2_PRS_RI_L4_UDP, + MVPP2_PRS_RI_IP_FRAG_TRUE | MVPP2_PRS_RI_L4_UDP, MVPP2_PRS_IP_MASK | MVPP2_PRS_RI_VLAN_MASK), MVPP2_DEF_FLOW(MVPP22_FLOW_UDP4, MVPP2_FL_IP4_UDP_FRAG_UNTAG, MVPP22_CLS_HEK_IP4_2T, MVPP2_PRS_RI_VLAN_NONE | MVPP2_PRS_RI_L3_IP4_OTHER | - MVPP2_PRS_RI_L4_UDP, + MVPP2_PRS_RI_IP_FRAG_TRUE | MVPP2_PRS_RI_L4_UDP, MVPP2_PRS_IP_MASK | MVPP2_PRS_RI_VLAN_MASK), /* UDP over IPv4 flows, fragmented, with vlan tag */ MVPP2_DEF_FLOW(MVPP22_FLOW_UDP4, MVPP2_FL_IP4_UDP_FRAG_TAG, MVPP22_CLS_HEK_IP4_2T | MVPP22_CLS_HEK_TAGGED, - MVPP2_PRS_RI_L3_IP4 | MVPP2_PRS_RI_L4_UDP, + MVPP2_PRS_RI_L3_IP4 | MVPP2_PRS_RI_IP_FRAG_TRUE | + MVPP2_PRS_RI_L4_UDP, MVPP2_PRS_IP_MASK), MVPP2_DEF_FLOW(MVPP22_FLOW_UDP4, MVPP2_FL_IP4_UDP_FRAG_TAG, MVPP22_CLS_HEK_IP4_2T | MVPP22_CLS_HEK_TAGGED, - MVPP2_PRS_RI_L3_IP4_OPT | MVPP2_PRS_RI_L4_UDP, + MVPP2_PRS_RI_L3_IP4_OPT | MVPP2_PRS_RI_IP_FRAG_TRUE | + MVPP2_PRS_RI_L4_UDP, MVPP2_PRS_IP_MASK), MVPP2_DEF_FLOW(MVPP22_FLOW_UDP4, MVPP2_FL_IP4_UDP_FRAG_TAG, MVPP22_CLS_HEK_IP4_2T | MVPP22_CLS_HEK_TAGGED, - MVPP2_PRS_RI_L3_IP4_OTHER | MVPP2_PRS_RI_L4_UDP, + MVPP2_PRS_RI_L3_IP4_OTHER | MVPP2_PRS_RI_IP_FRAG_TRUE | + MVPP2_PRS_RI_L4_UDP, MVPP2_PRS_IP_MASK), /* TCP over IPv6 flows, not fragmented, no vlan tag */ From patchwork Sun Mar 19 06:00:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Auhagen X-Patchwork-Id: 13180210 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69511C7618A for ; Sun, 19 Mar 2023 06:01:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229974AbjCSGBI (ORCPT ); Sun, 19 Mar 2023 02:01:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229967AbjCSGBH (ORCPT ); Sun, 19 Mar 2023 02:01:07 -0400 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2095.outbound.protection.outlook.com [40.107.13.95]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FE9B22116 for ; Sat, 18 Mar 2023 23:01:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jdtOEcnh1957puqnEIC7p1YEQG1pXFovZq3hgsg7/nXT1lEI17y0GjfHriSNpi0FWK8jkci++zeO3qZSvsFFIL3YsG8xUU4dHTYEXwEwuYU0UdhTCVQTs8KI7Nij2zQFmewY+BqVlAiu3U9RPT5xzQXZJFxGxpQFwKd9mFqZ43vzI2axr97+FReMR54tJbGxqBFZnMFCxvIs4XoUUvpgPDUVCereGMWo8xcSP7Ef9Q7PP5hymJ+GSDueqOu7JefiIpPjS5td4zd5CepxucEywroRvM/c+4EKAGBukd5RIHj3sqj3+934SARZ1X1caUWgJ4VJi/BM07fHT8aZRxBThg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=0HkTS8Jpr/KjJSkQGui7m7winhLAvRRIM8g02MHx2Q0=; b=mGhzzJkXRHfARfpdu7NPZDQXqA9E66hNAxWnXu9Mrn8y4/2eTXA9Q8bqpP+SVbORkTUpdRbQaT++cyMArrJ9mq2NDKQ/gUZTGmFxljIxjHelCJp0QeiBgVKJ+XIKSTNcEGy5uhhUKIgeszdFVcIPhj5Qz+xS5sQ+8yRYfUpY7SPZ1dS6fTRL+8BlQ/qxtFuZD0dt2NZ5C8+Z+DnPDj43q2C++443V3rz6UB+6gYnpD6JZ7s7kqVEp5RN3vX78k1zxnNgOTte6KJgXpkVWjLmERNJGp86rfGhdxxV5oI5Qz9eoFxRBUPaaXAH540lPoS9MDUovSa/qmSPMBDwx+VZvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=voleatech.de; dmarc=pass action=none header.from=voleatech.de; dkim=pass header.d=voleatech.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=voleatech.de; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0HkTS8Jpr/KjJSkQGui7m7winhLAvRRIM8g02MHx2Q0=; b=h8VWyu/XVB/sNB0cFxAAnJh/PDweOivTMHh1mmctiTyTABuV+WjHIWEoR8ZbqhJoeVelPwU+jA5jA4Q1AXkRFi+p0dIZCHwKi2sgOravnqBDZHh7tBtFSSRqRnhdiulF4maSjP6jXx9cUze4U7CuPg6yxVVzy+6qnuNjktwleTg= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=voleatech.de; Received: from AM9PR05MB8857.eurprd05.prod.outlook.com (2603:10a6:20b:438::20) by DB4PR05MB10392.eurprd05.prod.outlook.com (2603:10a6:10:3cf::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.36; Sun, 19 Mar 2023 06:01:02 +0000 Received: from AM9PR05MB8857.eurprd05.prod.outlook.com ([fe80::3fdc:3007:ffee:3c4d]) by AM9PR05MB8857.eurprd05.prod.outlook.com ([fe80::3fdc:3007:ffee:3c4d%9]) with mapi id 15.20.6178.037; Sun, 19 Mar 2023 06:01:02 +0000 Date: Sun, 19 Mar 2023 07:00:58 +0100 From: Sven Auhagen To: netdev@vger.kernel.org Cc: mw@semihalf.com, linux@armlinux.org.uk, kuba@kernel.org, davem@davemloft.net, maxime.chevallier@bootlin.com Subject: [PATCH v2 2/3] net: mvpp2: parser fix QinQ Message-ID: <20230319060058.iaptzyiwpi7sigez@Svens-MacBookPro.local> Content-Disposition: inline X-ClientProxiedBy: FR3P281CA0079.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1f::7) To AM9PR05MB8857.eurprd05.prod.outlook.com (2603:10a6:20b:438::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR05MB8857:EE_|DB4PR05MB10392:EE_ X-MS-Office365-Filtering-Correlation-Id: a7d66530-ca67-4bb4-49e2-08db283f5194 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: x4TOyqUUKVncClO8GRKCyk4zMkkIOZz8SXIdACFXLvV6GSvbs/mJEpyLV2cWaksumy6IjLb1tDMvr0OOfmSL1f+dFE49ePu+tKgLEyFZsuVG4eJhnpw0BzdI5pBHZW7/idHp8HJk6/RSfX8ILCBZ2MaC1GiOs9Hn1HH6trCqRPSYwFM5ihIA4RJUWdt/2Xbi+SMdHYsq+QKi48fo+nby215uybovECsCabyEPZTKPz3Xaf/k/2WC3mQ5xGi249OJVoYxGOXQOfCc4fENztZxgo7ZXR/FEKSamzyag4oDrrjSAI6yERdZekdUVBfjga7ugmyYvKFSNYRxU3UmyHYLWJQkl1G5zT9fr8RqdUXar0CKzrmumceRf0SFTWlG1zIBFzwVQKwqW+IvtUENgSBmoFD2+SvkQG/sgFWgT93Hgh8cEpuqspL84J0Ij2X7tdmfwYyqsUNwMben+AvY87cBLaJi8QFqDzaNEyWdtmMRdSwmqSwygk0DQvL0bLnLBqNlhf5k9F2CeWPzaFFXwF0B6snJOYGtMx0JduaQWE/DJDjZlbD3KkOCX+ODS3ve3CN4dSRJKLx0yzpV+DDXmWWXpcHVjBzEwDz3eRKfsyaX/gcQmzH4esf+0xKAhWeluhtuJ8rJMjQPIBh0JscDvl0/Cg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR05MB8857.eurprd05.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(39830400003)(136003)(366004)(396003)(376002)(346002)(451199018)(86362001)(316002)(4744005)(2906002)(8936002)(41300700001)(5660300002)(4326008)(66476007)(8676002)(66556008)(478600001)(6916009)(66946007)(38100700002)(83380400001)(6666004)(9686003)(6506007)(26005)(6486002)(186003)(6512007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: z3S0sFW7ACc9KWxSd3u+dPO+897fGT+YJelRBx9LWAUrcvOSkLFhLtOzTzY+FoC2LoflIRbgNUVAvhu2q4JicUefKD5H8WfZTPfyyfTBsWP2MPzhCtMO8qyTRF2fmCrD09Hoh54Assj97FH4VW2KnoKPaYjY+aajoGWKtasqnuOxTKGjWr1u6oUUPJYtsAPl7tqO/k8XNGZGaVwPoVvBv4Fil2HXinAROhhFbx2yEYa8RZB2orI1ZY3nQO+Qla11VWFt4M6HVXqzI/YkfgROIOh+l56PrB7HRSQ76SB2JMmOYOpUcLKHjf5tc8hzXroCluwqTEGCbVedRp6EmKn828m1B/pEl/Pqcd/2znbRSN2f9bbiyystEPu/B00sDIkRIWfEMlP/kOX+61Piemlfs+p9tbVV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o2XhuDnhmvYD9ZpQ6A93sXdfv2K/3lh1ApZWiESojg1+hoCJL23MMF4FXL+4go7B0TEl/MsNuBBDZtCosU+XKbGrmOgDzch7VrOFyPkfdIJATSbtkv/l/h0z4AloGvuWjocQA/HN/Jhjg== X-OriginatorOrg: voleatech.de X-MS-Exchange-CrossTenant-Network-Message-Id: a7d66530-ca67-4bb4-49e2-08db283f5194 X-MS-Exchange-CrossTenant-AuthSource: AM9PR05MB8857.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2023 06:01:02.1343 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b82a99f6-7981-4a72-9534-4d35298f847b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: RQxCt4qOkj0wc647ZEyjDEsQ1A2ElGhHaXTSEzEoKtj3D/divmL9HyHQ70P6BEqbDZ1kY2gZBo10qnusRzY619dvSh4HAsEA+j2ZQBpqyho= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR05MB10392 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org The mvpp2 parser entry for QinQ has the inner and outer VLAN in the wrong order. Fix the problem by swapping them. Change from v1: * Added the fixes tag Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Sven Auhagen diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c index 75ba57bd1d46..ed8be396428b 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c @@ -1539,8 +1539,8 @@ static int mvpp2_prs_vlan_init(struct platform_device *pdev, struct mvpp2 *priv) if (!priv->prs_double_vlans) return -ENOMEM; - /* Double VLAN: 0x8100, 0x88A8 */ - err = mvpp2_prs_double_vlan_add(priv, ETH_P_8021Q, ETH_P_8021AD, + /* Double VLAN: 0x88A8, 0x8100 */ + err = mvpp2_prs_double_vlan_add(priv, ETH_P_8021AD, ETH_P_8021Q, MVPP2_PRS_PORT_MASK); if (err) return err; From patchwork Sun Mar 19 06:01:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Auhagen X-Patchwork-Id: 13180211 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6475EC7618A for ; Sun, 19 Mar 2023 06:01:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230051AbjCSGBg (ORCPT ); Sun, 19 Mar 2023 02:01:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230032AbjCSGBd (ORCPT ); Sun, 19 Mar 2023 02:01:33 -0400 Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on2101.outbound.protection.outlook.com [40.107.13.101]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A67422132 for ; Sat, 18 Mar 2023 23:01:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AtEhC22BHwm6BtBAWxsM7letnL4j3fZE18MyouVJvOYWEY23i7oUEXnqQypU5H98NG7AEBiQV7DIDq2pOdO87UnO9tFNspguDPqsnpJo42Fy5iQgabR9b5J67cbxgEC8SsuK0mv8zwsSQU6eVgI8hIrDOUbWPKf5e2Bdz3eoon0nYlhWoRqLNHJ6fP+kz2lHS3MJzgL1Qf9ui02gvYD/BjkgUXRI+zBTGQdkZ10fCoQLxfNz0YJPD4Zs9QGLPFZGc2or21Pccjoc+ynNdEzMi+Lr8SB923+qRzvn3DzxEADpliTQlUdlKx2HTT4dr/mWR5ejLEWURY4acG9aWtnYfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=M268r/HFfHXITuYMGHMPyh3YU59Sx9eHm+UHyn/Tvwk=; b=Ams9CGaDJlbmupVn/jCEEO5rFooq9lRtte/3ryzxtMe4DW+OEoSM4cM6ct/wa/LIMRKxQZyYtzFD3YWgbWgDsCtM5qeppV9GSV343Z5o/btwzwrU2wy+ErUSSjY8HVA3Y1bHt3NI2zYJEUBTRAwll1pIA201K923+0xtpcLNoDbKw8dj34RCOIPODUscaeG1mSyAQdy33f5V+buavZY5rdvDWJ7qGKR3MAGWw2X7i1uglI4AD8HeL/gVvoGIlFzChxM//j/Z040cXRHOVz+Y92L8O2OGUgQoys/C7r/AYYvNfltKBhShmpJn8Z9R7/Zh4c0XhrgJ4Y+v4NaDkpb5yg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=voleatech.de; dmarc=pass action=none header.from=voleatech.de; dkim=pass header.d=voleatech.de; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=voleatech.de; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=M268r/HFfHXITuYMGHMPyh3YU59Sx9eHm+UHyn/Tvwk=; b=MXLiNR8FavtDl8bHsHXg5hZEV4Kj5fHYXNJZz2ZVaqa4E7sHcRsjKuwItGJqxRchDkuTIpKrlzALUwD1hPEZ6fcPf1EJkUqL0/u282AMjT7fQCkJ2dv7Re84o+gZG3qjCKK0KR9/yVM6aO9a5wKeR9Yew5XJsWUBQoB4St8is10= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=voleatech.de; Received: from AM9PR05MB8857.eurprd05.prod.outlook.com (2603:10a6:20b:438::20) by DB4PR05MB10392.eurprd05.prod.outlook.com (2603:10a6:10:3cf::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.36; Sun, 19 Mar 2023 06:01:19 +0000 Received: from AM9PR05MB8857.eurprd05.prod.outlook.com ([fe80::3fdc:3007:ffee:3c4d]) by AM9PR05MB8857.eurprd05.prod.outlook.com ([fe80::3fdc:3007:ffee:3c4d%9]) with mapi id 15.20.6178.037; Sun, 19 Mar 2023 06:01:19 +0000 Date: Sun, 19 Mar 2023 07:01:15 +0100 From: Sven Auhagen To: netdev@vger.kernel.org Cc: mw@semihalf.com, linux@armlinux.org.uk, kuba@kernel.org, davem@davemloft.net, maxime.chevallier@bootlin.com Subject: [PATCH v2 3/3] net: mvpp2: parser fix PPPoE Message-ID: <20230319060115.ivxaoosfhqqprfjj@Svens-MacBookPro.local> Content-Disposition: inline X-ClientProxiedBy: FR0P281CA0130.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:97::17) To AM9PR05MB8857.eurprd05.prod.outlook.com (2603:10a6:20b:438::20) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR05MB8857:EE_|DB4PR05MB10392:EE_ X-MS-Office365-Filtering-Correlation-Id: 549463b9-6e2d-407b-e1bd-08db283f5be7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HSkzBc3ITdm/ntauezTslL41WYdiOg3Sq1+w8mUd9cQioiuUAOL+AXnwAbTocZpkIEWsm2LKoMhV9PqJtQVP1LU+okwBMaWWDksp067lM7d5gJDKGyQkHeI5XSdqCr1uIp+qSouC3F/ocw7ZGbRruWA1iXB41GhQbzUCRKBhOWxd2ZH+nrVj1yFtj5KBsKJTQ5HpnFI4bBPhO+AnpCuVNp9+kPXgBHLjbhqSe4McazDkMf8dEHdCAjq6+zwUxoFnLkevVoYb176MJ4bTuzudt9iWdSRMj9WzuekkqNje29De2NKxfJ8GgpD960rq1hWLYKSuzl18+Iuu/q+q1i4zqfLd7xEuVc65TwIpIdqgf1LBU9TH23xXNRKmsCfj7dY4xetWI6Tz205FaMv3Ux7McwL6jfrL/y9n8PzQzWeOvMEt3U5YuycLdzUZCYelS+4yHArxp5x+hQ+1mcXuECsLTxh+9+1P7SWprEwNpwEgwf0jJXF1gexMRAhPxsf9YN/mUbwGTmxc7BZVtQ3Vc4aFuziuWCO2xlCnctPkl8QMPZujsbE9d0sLCFpYk5LGsB3zHfP0WYaFqJ6BDUwjlA2Oe9XJdSMAh94p3vvXn/haoZFisvqGLeS1L5qdUicL4RWAJ4qddmMl7F7MwMjJ96+RpQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR05MB8857.eurprd05.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(39830400003)(136003)(366004)(396003)(376002)(346002)(451199018)(86362001)(316002)(2906002)(8936002)(41300700001)(5660300002)(4326008)(66476007)(8676002)(66556008)(478600001)(6916009)(66946007)(38100700002)(3716004)(83380400001)(6666004)(9686003)(6506007)(26005)(6486002)(186003)(6512007)(1076003);DIR:OUT;SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RmOuZFfgIYi5v6r10Y3+uBpWmC/s5a7PZQ6q7MbWOrK1hsHQcgnVShwtZ3GJZpHXHuCbo902M0fdxQh1KsAR6dc3tAWQEBbh+02myh1SLegs5j9JZw41y1Me0z06vC7wpC3osXE4tVqMiDjbaWta2T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zP51yI88AeKdVcWeeOcvZFbwGO6fX0dvm3tZfcT8xGtVn+5WyTr9NXFS+bQvosLkkt+XgsFWasoV0bl55k4NLcLwZDdeyKlRAsdR9f2bHmIw1EUP3orRHAEk10n9jqKWnYV1H7SvEH/P6xh66t5HkmXBbTb9xV7oGqnifRNnbNvDCS5MVni9tukpsCWeWZWpa8zOmBlbkwdHNTGstIC4OhQdQKAHGfIxn8EdThZNJJL6cILEwXov/CWRA+2jihDrcX1tK4McF44HR+DBf/XqZPZszu+I5/Z/zX5Nx/DKQu1FE/yGwkNtnHfMkLRspkQhvTIM/YOifms8r7nunvM868xPk760xKpOIiUsJ02pIbe4tSGHq6j7xt+PrRsFg7azfjvdaFA== X-OriginatorOrg: voleatech.de X-MS-Exchange-CrossTenant-Network-Message-Id: 549463b9-6e2d-407b-e1bd-08db283f5be7 X-MS-Exchange-CrossTenant-AuthSource: AM9PR05MB8857.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Mar 2023 06:01:19.5133 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b82a99f6-7981-4a72-9534-4d35298f847b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: YbIyRFvZMB2kFQW0kREKmSZ6GhJHi6dZ+Wq72l6HBhS7mSgRAkg45R4Ki8gV/rlXO1yTBvCj5H1rXNCPOqEUduyjDGzmqIQYNlUPnipFJZg= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB4PR05MB10392 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org In PPPoE add all IPv4 header option length to the parser and adjust the L3 and L4 offset accordingly. Currently the L4 match does not work with PPPoE and all packets are matched as L3 IP4 OPT. Change from v1: * Added the fixes tag Fixes: 3f518509dedc ("ethernet: Add new driver for Marvell Armada 375 network unit") Signed-off-by: Sven Auhagen diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c index ed8be396428b..9af22f497a40 100644 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_prs.c @@ -1607,59 +1607,45 @@ static int mvpp2_prs_vlan_init(struct platform_device *pdev, struct mvpp2 *priv) static int mvpp2_prs_pppoe_init(struct mvpp2 *priv) { struct mvpp2_prs_entry pe; - int tid; - - /* IPv4 over PPPoE with options */ - tid = mvpp2_prs_tcam_first_free(priv, MVPP2_PE_FIRST_FREE_TID, - MVPP2_PE_LAST_FREE_TID); - if (tid < 0) - return tid; - - memset(&pe, 0, sizeof(pe)); - mvpp2_prs_tcam_lu_set(&pe, MVPP2_PRS_LU_PPPOE); - pe.index = tid; - - mvpp2_prs_match_etype(&pe, 0, PPP_IP); - - mvpp2_prs_sram_next_lu_set(&pe, MVPP2_PRS_LU_IP4); - mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_L3_IP4_OPT, - MVPP2_PRS_RI_L3_PROTO_MASK); - /* goto ipv4 dest-address (skip eth_type + IP-header-size - 4) */ - mvpp2_prs_sram_shift_set(&pe, MVPP2_ETH_TYPE_LEN + - sizeof(struct iphdr) - 4, - MVPP2_PRS_SRAM_OP_SEL_SHIFT_ADD); - /* Set L3 offset */ - mvpp2_prs_sram_offset_set(&pe, MVPP2_PRS_SRAM_UDF_TYPE_L3, - MVPP2_ETH_TYPE_LEN, - MVPP2_PRS_SRAM_OP_SEL_UDF_ADD); - - /* Update shadow table and hw entry */ - mvpp2_prs_shadow_set(priv, pe.index, MVPP2_PRS_LU_PPPOE); - mvpp2_prs_hw_write(priv, &pe); + int tid, ihl; - /* IPv4 over PPPoE without options */ - tid = mvpp2_prs_tcam_first_free(priv, MVPP2_PE_FIRST_FREE_TID, - MVPP2_PE_LAST_FREE_TID); - if (tid < 0) - return tid; + /* IPv4 over PPPoE with header length >= 5 */ + for (ihl = MVPP2_PRS_IPV4_IHL_MIN; ihl <= MVPP2_PRS_IPV4_IHL_MAX; ihl++) { + tid = mvpp2_prs_tcam_first_free(priv, MVPP2_PE_FIRST_FREE_TID, + MVPP2_PE_LAST_FREE_TID); + if (tid < 0) + return tid; - pe.index = tid; + memset(&pe, 0, sizeof(pe)); + mvpp2_prs_tcam_lu_set(&pe, MVPP2_PRS_LU_PPPOE); + pe.index = tid; - mvpp2_prs_tcam_data_byte_set(&pe, MVPP2_ETH_TYPE_LEN, - MVPP2_PRS_IPV4_HEAD | - MVPP2_PRS_IPV4_IHL_MIN, - MVPP2_PRS_IPV4_HEAD_MASK | - MVPP2_PRS_IPV4_IHL_MASK); + mvpp2_prs_match_etype(&pe, 0, PPP_IP); + mvpp2_prs_tcam_data_byte_set(&pe, MVPP2_ETH_TYPE_LEN, + MVPP2_PRS_IPV4_HEAD | ihl, + MVPP2_PRS_IPV4_HEAD_MASK | + MVPP2_PRS_IPV4_IHL_MASK); - /* Clear ri before updating */ - pe.sram[MVPP2_PRS_SRAM_RI_WORD] = 0x0; - pe.sram[MVPP2_PRS_SRAM_RI_CTRL_WORD] = 0x0; - mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_L3_IP4, - MVPP2_PRS_RI_L3_PROTO_MASK); + mvpp2_prs_sram_next_lu_set(&pe, MVPP2_PRS_LU_IP4); + mvpp2_prs_sram_ri_update(&pe, MVPP2_PRS_RI_L3_IP4, + MVPP2_PRS_RI_L3_PROTO_MASK); + /* goto ipv4 dst-address (skip eth_type + IP-header-size - 4) */ + mvpp2_prs_sram_shift_set(&pe, MVPP2_ETH_TYPE_LEN + + sizeof(struct iphdr) - 4, + MVPP2_PRS_SRAM_OP_SEL_SHIFT_ADD); + /* Set L3 offset */ + mvpp2_prs_sram_offset_set(&pe, MVPP2_PRS_SRAM_UDF_TYPE_L3, + MVPP2_ETH_TYPE_LEN, + MVPP2_PRS_SRAM_OP_SEL_UDF_ADD); + /* Set L4 offset */ + mvpp2_prs_sram_offset_set(&pe, MVPP2_PRS_SRAM_UDF_TYPE_L4, + MVPP2_ETH_TYPE_LEN + (ihl * 4), + MVPP2_PRS_SRAM_OP_SEL_UDF_ADD); - /* Update shadow table and hw entry */ - mvpp2_prs_shadow_set(priv, pe.index, MVPP2_PRS_LU_PPPOE); - mvpp2_prs_hw_write(priv, &pe); + /* Update shadow table and hw entry */ + mvpp2_prs_shadow_set(priv, pe.index, MVPP2_PRS_LU_PPPOE); + mvpp2_prs_hw_write(priv, &pe); + } /* IPv6 over PPPoE */ tid = mvpp2_prs_tcam_first_free(priv, MVPP2_PE_FIRST_FREE_TID,