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 17CE142BDA; Tue, 30 May 2023 05:09:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D760140F18; Tue, 30 May 2023 05:09:57 +0200 (CEST) Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by mails.dpdk.org (Postfix) with ESMTP id BF6CD406BC for ; Tue, 30 May 2023 05:09:56 +0200 (CEST) Received: by mail-pj1-f51.google.com with SMTP id 98e67ed59e1d1-256797b5664so1086130a91.2 for ; Mon, 29 May 2023 20:09:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1685416196; x=1688008196; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=q7DLK5kO07vrGI+6f6Mf8g4rl0uv7MdkNrZNXKSHZdc=; b=nTeg7oAaobZb3SZ0Y3iRoFtwc7NljFgFRh8MG5rNRCWC2Q2Iq6C6Q0sDehU0uWe1Dd +p8LetT2X4xEzgwa/wKHTtlTWF40FclVgwtgQanTLWJbOrNhbxrZcSLeqx6WdmPlLGZ0 2n/Y2HtE1fjeVjqu6/TUSXU7H8pd6WcKUkPdbZpq7sM4ix1bzbBHwCieUaeVWUKvmIWX tilh6vv/fG3lm1vfm7T6Mi/hu66Vg3+Vylp/UYsQc8Ll+wRWw7BRB5+K/duyGYw4UAVx YcU7NlasqjpHfRZnavv4v3Khki4SMbrFNyYwA9IXHGtgdrEPTr4u6CvvqbwpLoOvLn5W zQfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685416196; x=1688008196; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=q7DLK5kO07vrGI+6f6Mf8g4rl0uv7MdkNrZNXKSHZdc=; b=c/BylrB/2z4+gt6XCjWdzDrdx1S6zIVXmE9Kt6ROa6qt3Puc5/VChVUjJDyXND3OxI z7WWHhMddJr3/OAio4YNAZgZH59Mds4YsO562GjBKsi9z1oT3Jhl5Z4yLoHcISZPm4W5 eNR59pDW38HOt95dFT1dgv9NkXN8gv05UK9RcKQYsBiocEINMzeC+gnVNe+O8EREUwNe f2XKRcD/Q0ap13Ilshty0Snp8yaS1hEZap/CeGd1jd7xKgGVsgryszQyjjgDVwcCj+g2 o154ZSimQQI7qky9LL/QwoYC+lj9Xh5Ws2O9B3eUd45lhlZGQ7tzSJHACR7Y2Gozu/E2 19rw== X-Gm-Message-State: AC+VfDwskKDvku4h/HmQ9+qCLk8DdG49CQuSSgnD/No0LMEbTGrFFgw6 ry73dK5YqO7VGF4Y0P1Zosz66A== X-Google-Smtp-Source: ACHHUZ4b4LkrtNZ5E64bietlxB/j53aeipGIMOaQgeSBzPFVVeQjyeFXtIUT5r4J5OqJCipDvF8ldg== X-Received: by 2002:a17:902:e886:b0:1b0:471c:4c3 with SMTP id w6-20020a170902e88600b001b0471c04c3mr1208403plg.40.1685416195937; Mon, 29 May 2023 20:09:55 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id q12-20020a170902a3cc00b001a64851087bsm7129040plb.272.2023.05.29.20.09.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 20:09:55 -0700 (PDT) Date: Mon, 29 May 2023 20:09:53 -0700 From: Stephen Hemminger To: Cc: , Ruifeng Wang , Yipeng Wang , Sameh Gobriel , "Bruce Richardson" , Vladimir Medvedkin , Konstantin Ananyev , Subject: Re: [PATCH v3 1/2] ip_frag: optimize key compare and hash generation Message-ID: <20230529200953.7d7e77f0@hermes.local> In-Reply-To: <20230529145502.11805-1-pbhagavatula@marvell.com> References: <20230523143921.7420-1-pbhagavatula@marvell.com> <20230529145502.11805-1-pbhagavatula@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 Mon, 29 May 2023 20:25:01 +0530 wrote: > + return (k1->id_key_len != k2->id_key_len) || > + (k1->key_len == IPV4_KEYLEN ? k1->src_dst[0] != k2->src_dst[0] : > + rte_hash_k32_cmp_eq(k1, k2, 32)); If you make another version, one small comment. Breaking this into a couple of if statements would make reading easier for human readers. Compiler doesn't care.