From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6B55742C08; Fri, 2 Jun 2023 00:09:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E7E61406B8; Fri, 2 Jun 2023 00:09:54 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2051.outbound.protection.outlook.com [40.107.220.51]) by mails.dpdk.org (Postfix) with ESMTP id 5F37140693; Fri, 2 Jun 2023 00:09:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NZYJTWKU+tonvhVh5LnZhZjX59OY5uEVuiEYDKlOVcJZUwAy1qTdwC/bnO5YDdIRnRQvmBJNxh1N9lvdrfilLSkx46eWuiSfad/5pMr2ms6M767aX7/HMGRbeV5MdAJWJfxD9jsUHdSatBwq0fwRxxkzuX7hhNrEAJB6Jfmi+iIn/3xvgmwSHpW2iP68FhWMvgxo1SemwnvYAbFdahphzQPkxeFJIOSOlLbkW+ag3wXaE+tt3TJOoBOH/E0BME0RoQFho7PO7Z/otlWWn078e6imDUWJmPemJcHLyAGMDlH5RFcFN8NcJG3GOYOMTw+/seRHrZhZFP/2jrK9PbXD4w== 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=wP6AEhrr1vZC7RiRDa9LgNolU3AIrKr7xo4n7qfZ1cs=; b=k8kOvmQ5oSec1CCiP9eQaY92BQfmW8UIocFq+umzXruarUviBcgkxAYOqrczlxCDUF5Slho6iuEE35zJnEdVWVG4Nqt+mgNfXU2QKyAEhUhEc2S4ZP6ZDZVieZUcH5CoC8YMnPLvjDy1QWMqIqbrhQ3f2vkJWkup3Zpio+h28XYZF5SgDj0yZbLZ7/QhCN4Nyni96wmVmZgRG83+pklqhTCsL4iXmJubgFjIZUdpEqtnr948qdKQk61jhbBItEkbrjWlKiRGTp+ZqKt1odFs6oUnHSLU4OaL7rou+m9J5RtVsgbp761PYnwGa1nPsIv1amDxK9NIys7qETlMchTgPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wP6AEhrr1vZC7RiRDa9LgNolU3AIrKr7xo4n7qfZ1cs=; b=G+cBNvI+Jp02G4q57RwhPT7TGgGDUEpsu/2Oqs2/d1E6x0+5Ik5oTlKPMW85tRRHIMB/boR64ViR+fPWRFeYK4yBz+024mTQFp6eK65mSXgyxs3qhYKWX+QhOspZQ6XOged24xkIJhFhsdwLpUCnPvMks3ecp1WlwNsxP3PLBik= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by DS7PR12MB5789.namprd12.prod.outlook.com (2603:10b6:8:74::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.23; Thu, 1 Jun 2023 22:09:49 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::7957:641d:6aba:3f9a]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::7957:641d:6aba:3f9a%4]) with mapi id 15.20.6433.022; Thu, 1 Jun 2023 22:09:48 +0000 Message-ID: Date: Thu, 1 Jun 2023 23:09:33 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.2 Content-Language: en-US To: Shiyang He , dev@dpdk.org Cc: yidingx.zhou@intel.com, stable@dpdk.org, Aman Singh , Yuying Zhang , Somnath Kotur , Andrew Rybchenko , Olivier Matz , Ajit Khaparde References: <20230530153603.105257-1-shiyangx.he@intel.com> From: Ferruh Yigit Subject: Re: [PATCH] app/testpmd: fix IPv6 tunnel packet checksum error In-Reply-To: <20230530153603.105257-1-shiyangx.he@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0201.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:318::10) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DS7PR12MB5789:EE_ X-MS-Office365-Filtering-Correlation-Id: 5d5aae3d-35e2-44da-7055-08db62ecea4a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XeeGz/1Vn5RAE2xL+nHMMdwBCHeQuCVR2aQilrkB3SPttqAQgvtkiKMmQWjFIiOoMcGj/o0qK4h+ML1Wuu6xNzxb1LgM8F0ZUAkpGTHfuMigVR3rNMSzlbNwwVZcWLa7WtZDkWVWQtN2YvPdyMcggQp+tLCYLB4ippv0sBZseopciAR54wCLcCmbWgWX+53zPyUW4jEUX2EgUNysF1ZMOQn5eifTTkFzB2Jc9xglGFH9aM2m9KuZLNNVphiS6nZPgX5CAMdkDKBuudIFRBUnRLNS1+nKuWKwKmutRN7KnguslJU+O2U4hkxhOdu46/jChcA9prUaCLvm5ErNSBau+hUAEuR5K48PeSPQ/pUIFIDGKX/YGPfPvAFGlGrdPpbKgzyfixZ1LS3XH7SbTM917GPWWeokmY5H93FdWC2BJaVvjZ1TGurqY/0QuHjFyuG8q2J7M5V0pJM7pQF5ct437bBI6kCWt8H1tDXDHjj3hKdacJcW9yVY5c0PA5mlA8/wr1JvcRbvA40N0wL7e0g7xRF/QiVpkNiACUDHGAyUi25wC3WvaxnJQPjh36uOFJqRJdX1cWYRDVHn/m0QcS6nu1PlDTzhloEzCfKgS2jZDjXOWiCP0H0Bsmw5QfMIOyf/l1tar5ZLt4XJcuYODM8wSw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(376002)(136003)(39860400002)(396003)(366004)(346002)(451199021)(26005)(41300700001)(38100700002)(6666004)(6486002)(53546011)(31686004)(6512007)(6506007)(186003)(83380400001)(2616005)(54906003)(478600001)(8676002)(66476007)(4326008)(66556008)(66946007)(316002)(5660300002)(44832011)(7416002)(8936002)(86362001)(36756003)(31696002)(2906002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?R0JhbnBWZ1dGS3dWRGtTVmFETUNlU01ucFJNaytYQ3dRK1lBMXFjc1VxalRv?= =?utf-8?B?MHloRks1R3IrRXhJbDh5T2JXN3IyUW1lK3dUVW13S2hOM2lnc0RQNmNaTkJx?= =?utf-8?B?dmhBMmJ0YmNoMTRpRUpISzF3MHlyeHVGcm9oSkVlUGFiR3pLYkRhdy9zWHho?= =?utf-8?B?c01mZmFlSGVIZlNxQURDL2VydW5TZnJycjRqQngrRW5iVE5SdGQ3cjR2N2dT?= =?utf-8?B?VUpSTUpyb3h0a0hpd1JGOHFnbnFsUGgwNkROZHM1OWZaZllVM1A5MWU5WE9N?= =?utf-8?B?VWdKeHYzelF4UzYrNDJPc2JjbUJJNEFpMjlXUzhoQlRUbnBYM3liOGxNand4?= =?utf-8?B?SnFwOElFb0dibDFBdnJYL2VqO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Id: 5d5aae3d-35e2-44da-7055-08db62ecea4a X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Jun 2023 22:09:48.7954 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: kar9/EsNhrAJ86sPwwRvtSc5TDI7V77evhiF0c/zVr7PbDnU59v5u2DWPtov4uJ8 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB5789 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 On 5/30/2023 4:36 PM, Shiyang He wrote: > In checksum forwarding mode, the checksum of tunnel packet calculated > incorrectly when outer header is IPv6. > > This patch fixes the issue by setting L4 checksum flag. > > Fixes: daa02b5cddbb ("mbuf: add namespace to offload flags") This commit just updates the flag name, actual commit that introduce the commit should be something else. Probably: Fixes: c14236f210d8 ("mbuf: replace inner fields by outer fields semantic") Cc: jijiang.liu@intel.com > Cc: stable@dpdk.org > > Signed-off-by: Shiyang He > --- > app/test-pmd/csumonly.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/app/test-pmd/csumonly.c b/app/test-pmd/csumonly.c > index fc85c22a77..bd2fccc458 100644 > --- a/app/test-pmd/csumonly.c > +++ b/app/test-pmd/csumonly.c > @@ -582,7 +582,7 @@ process_outer_cksums(void *outer_l3_hdr, struct testpmd_offload_info *info, > else > ipv4_hdr->hdr_checksum = rte_ipv4_cksum(ipv4_hdr); > } else > - ol_flags |= RTE_MBUF_F_TX_OUTER_IPV6; > + ol_flags |= RTE_MBUF_F_TX_OUTER_IPV6 | RTE_MBUF_F_TX_L4_MASK; > When 'or' with MASK, it is same as requesting UDP checksum. ``` #define RTE_MBUF_F_TX_UDP_CKSUM (3ULL << 52) #define RTE_MBUF_F_TX_L4_MASK (3ULL << 52) ``` Can you please describe more the problem, is it UDP checksum missing (since ipv6 itself doesn't have checksum)? If so, shouldn't code check first that if UDP checksum offload is requested? Can you please describe why/how above code change is fixing the issue?