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 683D842417; Thu, 19 Jan 2023 13:04:08 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 08CE7410DD; Thu, 19 Jan 2023 13:04:08 +0100 (CET) Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on2087.outbound.protection.outlook.com [40.107.95.87]) by mails.dpdk.org (Postfix) with ESMTP id 020F34068E for ; Thu, 19 Jan 2023 13:04:06 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=n2EcDHTrbwZ7uhJeDYW7mLZY4L1fv303bPBFkjTrpqA3StcUaD2MajF98kI8hx+y+9TWkmy1oL/OV2UMhA+lcG8DbGKZPXasfJbZ6tWsg9d7tm1rT0PVgAS5mh2dlMn4/eQXAYAicepj+JoGe1sQsVcKk+pLpP4cUIxUSbot834HoHaTwP0Ib4ywt6ASyR9zRNl2YsEuSIQ9EWbTdn2yKjfw84wIr9umIkb7OhoH+Vva8HW+sFPj0swZHQodUDsYU/32Zx5QOBjANt8ofmuqM8QCGCYdYX/6JPCa+qC6vzMtCwOL98vcjOvC4OrCKxde7ZjwOMSsxtWkHlQEJTPKsw== 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=1R1OXRC4IXLP+V+92Wb7Bprx7wMmTX8J45b1UKYmDt0=; b=jS7kLYyoxykfiue53+BFn4yq1fnfPJRyKuHIMJFA3Y+f4n8z9IXFWZ9slUuk2NEkYYY0bGeybfaO6H7X+y6XSsy1moue4N0E54cPa4CI95hyGkeUqLoybP7RtaU+6UQ+MulfSYQXdQgqUOcJ77DJv1tpycsmei8+rg1r5OhHUbBfjd3brBjl2sxMBUerEhfVVL1BFSlvP8HaDqE0iucWU2fiKZ5lEGuzwF4+H1lti/pq76bv09ZFoG0kcT8fLpI/PkiOran2Hq2thFhz3PKjI8jizhq02W3JXNz34X7IC++nO2R/mbEU2BQjiSnYNS7rKoLqpUglNt6sLyZ32HvT6A== 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=1R1OXRC4IXLP+V+92Wb7Bprx7wMmTX8J45b1UKYmDt0=; b=p46kw0/FKNvVTJMu15eHrFAJIBpOeuzDUZ3Di94/T8KJq+TIJpOPoE8B2/UsciTegCS9FxKhIA27xT4U4HxXxPtOd/2eD3DPWp5eElQ4Up3Eq/fHHitzatNtRIiJ+6ymzamSkauj9xCKTGDJKJ6Rs3u8SowSMYcZ9hgu95R68TA= 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 BN9PR12MB5292.namprd12.prod.outlook.com (2603:10b6:408:105::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.25; Thu, 19 Jan 2023 12:04:05 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::4807:1f44:5e04:e05a%8]) with mapi id 15.20.6002.024; Thu, 19 Jan 2023 12:04:05 +0000 Message-ID: Date: Thu, 19 Jan 2023 12:03:59 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 Subject: Re: [PATCH] net/tap: Fixed RSS algorithm to support fragmented packets Content-Language: en-US To: madhuker.mythri@oracle.com, Ophir Munk Cc: dev@dpdk.org, sthemmin@microsoft.com, Thomas Monjalon References: <20220420112400.2271-1-madhuker.mythri@oracle.com> From: Ferruh Yigit In-Reply-To: <20220420112400.2271-1-madhuker.mythri@oracle.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PA7P264CA0092.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:348::17) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|BN9PR12MB5292:EE_ X-MS-Office365-Filtering-Correlation-Id: c22dc286-56b1-40eb-eb73-08dafa1542a2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: XufPnXmwMW/h7U7L3b46VqxxfYjhD2GlDA2Eg383IQgIcHHaENHcFirAF3vhR3WVjAP6tdOu5/uvlZ9dJtsEGcfOSqocIxaSOdl/FFbyU19dKm7SAexFCMWtVgIfqq+Kvqgp70WgIroRjK29d0IqJLrEzHR7n1WSmK14ZylvRxBt3pc2fUPqYx9nH7X2N/+c1+Q89N1qRcpySGFQGaH7g70OQZmMRyHj1yacgbyHpLBimw48b5pBElY+7uDuu1VfuA260YaMKSkWdDsW67MU892xNIAuAcAfoTIQSVhuP6SkDNHnbfRWFIFP+OXCua5PrPvWbZLJhpOfkpOXodKlVyzjoT5oeX4YPPQrkLsKpS3cJZ8vTxdjAZ3Kcd/wypVU+qFXK/fDsNW2DXgNSXbGp9WZAT6LiPndrfiBiEPd3bhIHjIJSxzml3o6mq6sjMF3rPlT+kPd2ahZHbhOZm3ZA0fGJlYJiWG/2IzmkSqvytM9ZcsUh7aA+UfvQGA3X+LWG+ayupO77HkHNFBwPQ7CbfxnKLWzvUcQBWo88cEcKI8h5EVK62DDSPf7wBzugbCl+TyGKgWisqFG8FaxYAVAG0uiAyQDlyQdaNgvS8gmwJ5ODam4kmGZ7oz7l5fSyiZPfwA2Mkuoe4/B9xxopwxhfvJpBdaGJU5BgDg3DDIJUetZTZIKAvMZPeWEyHxo5n41qIByA+Lv1kBZccClicGbooMPHJgiWQZ5bYHg5Rwe4KluxGyWC8AYgc7+KcjDn/CG 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:(13230022)(4636009)(396003)(366004)(39860400002)(376002)(346002)(136003)(451199015)(6486002)(6506007)(966005)(478600001)(53546011)(31686004)(6666004)(26005)(186003)(6512007)(2616005)(44832011)(316002)(6916009)(66476007)(66946007)(4326008)(8676002)(66556008)(86362001)(83380400001)(41300700001)(36756003)(38100700002)(5660300002)(31696002)(8936002)(2906002)(45980500001)(43740500002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?bW9oY01WU3M1RFNuazZTaEJuVUVJYUo4eE1YRzUvTXU3L21HVzMzd0s3Um00?= =?utf-8?B?MjdZRXRPYnJaZ1M2Sng1NFRMVGM1Nkw1M2NNcGZDTTVTdUlrdWZvUWFOd04z?= =?utf-8?B?RURqc3pWL2lqUDhTRHhOd2xBOUlPUk0rRllRMmFxaGtlYTJNaG5TdSsvaHFv?= =?utf-8?B?bWs4aVRLTDdhUkM1RmRDVjdWZzYxSlVDelh2dTgwTmlXQ0ljaU01YkRpTHB4?= =?utf-8?B?UWtGTGVLSFJvZUNqbjZQZUhmTnFJb0ZlbTJkS2RXQ1lWUHdCbVRDdlEvRDJM?= =?utf-8?B?VUxhdkprblZ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wNjU5QnliZmQrc2RBRXZyM2drOXNvdU9J?= =?utf-8?Q?NV/Tw67I6mwxUjDLEsa2sH45a?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c22dc286-56b1-40eb-eb73-08dafa1542a2 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2023 12:04:04.8857 (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: TCTmSjHmqlziWvrVNpuR3nbgSzMiGOSVq+/mo4IbJEP9xkgSt16cAejhwL35S15S X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN9PR12MB5292 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 4/20/2022 12:24 PM, madhuker.mythri@oracle.com wrote: > From: Madhuker Mythri > > As per analysis on Tap PMD, the existing RSS algorithm considering > 4-tuple(Src-IP, Dst-IP, Src-port and Dst-port) and identification of > fragment packets is not done, thus we are seeing all the fragmented > chunks of single packet differs in RSS hash value and distributed across > multiple queues. > The RSS algorithm assumes that, all the incoming IP packets are based on > L4-protocol(UDP/TCP) and trying to fetch the L4 fields(Src-port and > Dst-port) for each incoming packet, but for the fragmented chunks these > L4-header will not be present(except for first packet) and should not > consider in RSS hash for L4 header fields in-case of fragmented chunks. > Which is a bug in the RSS algorithm implemented in the BPF functionality > under TAP PMD. > > So, modified the RSS eBPF C-program and generated the structure of > C-array in the 'tap_bpf_insns.h' file, which is in eBPF byte-code > instructions format. > > Bugzilla Id: 870 > > Signed-off-by: Madhuker Mythri > --- > drivers/net/tap/tap_bpf_insns.h | 3371 +++++++++++++++-------------- > drivers/net/tap/tap_bpf_program.c | 47 +- > 2 files changed, 1742 insertions(+), 1676 deletions(-) Hi Ophir, Original files from you, can you please help to review this patch? For reference, this is in patchwork: https://patches.dpdk.org/project/dpdk/patch/20220420112400.2271-1-madhuker.mythri@oracle.com/ Thanks, ferruh