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 ED5A8A0032; Wed, 11 May 2022 16:23:32 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9504940DDD; Wed, 11 May 2022 16:23:32 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 69D8F406B4 for ; Wed, 11 May 2022 16:23:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1652279010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AelIakFJkK6fGj935t5Z2azejAcLLtNGIfHMNmp9mwo=; b=io0wcaHH1wp+lXcAaZhhijzUY5ucbbhR+SP9P7EELLGcJfWFNN2LMb0ZRMoaoWzCU3UjhJ pkxko4DPbRwxL/NYweFfvMR58/7KbQ9+Qg7zfibzbh8lUgvhpTktDr3vOdEcwhvRcH015p /u0Us/zs/lVOkZB4+/1TJT4XeF/7jnE= Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-270-yQiar4jjMKGjVaLi9B0KSw-1; Wed, 11 May 2022 10:23:27 -0400 X-MC-Unique: yQiar4jjMKGjVaLi9B0KSw-1 Received: by mail-lj1-f197.google.com with SMTP id j6-20020a2eb706000000b00250c3958dccso790051ljo.21 for ; Wed, 11 May 2022 07:23:27 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AelIakFJkK6fGj935t5Z2azejAcLLtNGIfHMNmp9mwo=; b=imCOREza9LQIAQqFm+UDWnsiTg3Ulu/kQYMz5s58yWprueOLldlZf72gJCdrNrrZbX 3pwSrUBPYcOt0hi/lY/+4w5Xfi5DbsFrKkaQyGd5SIfx4EwEbvc+wV/nW01eHjrlsBs0 PqL6zDMyebZqORMjl/akKXLYjUETFGqjWg3CZf+pm0sQGDffbyRNh3dgCWsbVF0IO8D4 SRGK3nKqLffSz81IXev7WXFDwtJLZ1qZ0coK6dMjl6leyKRvHQ+QrQtcqVjVlFGWp1BF SrY0Vcpb9kvSUYz6yRfOJK52EEEeoF4IN2gCufr+DeVarZb/2Gp5VqNEyKDQAPQo5uV6 3Ygg== X-Gm-Message-State: AOAM530i0j6G13KdvoqqsFGzr5DeL3OTO4v9+q8e/5XBtet35Xkr3men fRum/DFybnWrIJFlc1QMhTGhAWa/UEHoIJheAxeqICX/+rgZWdficyerqAWXJffaSvnBiq6Ix9n stX1OrK1OHZdDKWsPW/U= X-Received: by 2002:a05:6512:3204:b0:472:4792:e29c with SMTP id d4-20020a056512320400b004724792e29cmr19800434lfe.553.1652279006279; Wed, 11 May 2022 07:23:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNrn8yonLfDwNnz1mtL+Ypj0LmajoSIo2XoBNz4z35TuCSPQ/dhW6lghd2jgIHwFIPCLR7HLo+2yXHGLyreco= X-Received: by 2002:a05:6512:3204:b0:472:4792:e29c with SMTP id d4-20020a056512320400b004724792e29cmr19800421lfe.553.1652279006082; Wed, 11 May 2022 07:23:26 -0700 (PDT) MIME-Version: 1.0 References: <20220427152232.19223-1-pbhagavatula@marvell.com> <20220429161700.2145-1-pbhagavatula@marvell.com> <20220429161700.2145-2-pbhagavatula@marvell.com> In-Reply-To: From: David Marchand Date: Wed, 11 May 2022 16:23:14 +0200 Message-ID: Subject: Re: [PATCH v8 2/2] hash: unify crc32 selection for x86 and Arm To: "Wang, Yipeng1" , Pavan Nikhilesh Cc: "ruifeng.wang@arm.com" , "Gobriel, Sameh" , "Richardson, Bruce" , "Medvedkin, Vladimir" , "jerinj@marvell.com" , "dev@dpdk.org" Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dmarchan@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" 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 Wed, May 4, 2022 at 4:53 AM Wang, Yipeng1 wrote: > > static inline void > > rte_hash_crc_set_alg(uint8_t alg) > > { > > + crc32_alg = CRC32_SW; > > > > + if (alg == CRC32_SW) > > + return; > > > > + if (!(alg & CRC32_SSE42_x64)) > > + RTE_LOG(WARNING, HASH, > > + "Unsupported CRC32 algorithm requested using > > CRC32_x64/CRC32_SSE42\n"); > [Wang, Yipeng] > I have a question regarding this logic. > For the set_alg API, how about if user specify to use sse42 (not the 64bit version) algorithm on a em64 CPU, does it also warn "unsupported algorithm" and force user to use the x64 version? > It seems behaves differently than the current API definition. Can we conclude on this topic? Thanks. > > > + if (!rte_cpu_get_flag_enabled(RTE_CPUFLAG_EM64T)) > > + crc32_alg = CRC32_SSE42; > > + else > > + crc32_alg = CRC32_SSE42_x64; > > #endif > > -- David Marchand