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 A4929A0C4B; Fri, 15 Oct 2021 11:33:46 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 954FF411EB; Fri, 15 Oct 2021 11:33:46 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mails.dpdk.org (Postfix) with ESMTP id ED20740692 for ; Fri, 15 Oct 2021 11:33:45 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1634290424; 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=jWvfZKG2VjLKP+NY+dPVOMbVm1x1Ii/dSCzDjaISzMA=; b=CdGIgzB0htCC1obcgfeEhbHSNvd1an4OWkfBGNP/rlmKkC5Ii+y97bbmYIn3UCvv4vAY8X DYgD+N5UpiHSACGl36CtjJDCGMpLhMS5cZ4DDzZvdeh76h9XKQt7Or3l5gQ2LN7c3BLx6p uZ1LFONin30o0sPsvGzJ9xea4kTKIu8= Received: from mail-lf1-f71.google.com (mail-lf1-f71.google.com [209.85.167.71]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-147-pBYP9G8xMQCXAqGp-VYhPw-1; Fri, 15 Oct 2021 05:33:43 -0400 X-MC-Unique: pBYP9G8xMQCXAqGp-VYhPw-1 Received: by mail-lf1-f71.google.com with SMTP id b29-20020a0565120b9d00b003fdc9b2546dso1239856lfv.14 for ; Fri, 15 Oct 2021 02:33:42 -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=jWvfZKG2VjLKP+NY+dPVOMbVm1x1Ii/dSCzDjaISzMA=; b=hZYurQu+Gm/2KvUtk38tuD2S/H/OIjVGPAIz0+D9WiOGabjsOQ9tw0+ewuPd+nBzYg lErV+IzTqiynQTuwfw3UnDVpPHRt9QYxbLhODGD+p1ujh6Bf8t7+Ibzm+LuVJ//Sg8Hx R9HeqHAt+ZydlOP7/55WjrJvPL0P+FbIwF10ykdUNVkZ2pLZi1heYUClfkeaCVlWLnX4 4/zEZ3yp2qiXy4M2MRcL4qn99c1HTvKMIViD3uczmdDvhNtTH2zysIvmVbXcObTzPW8h wHRjr6VAFmifjMUtVd9WwK/NRjodbxG4HjXVfViw6Fffi4oQWv+bqUPPjAOJMcozA2eT zPog== X-Gm-Message-State: AOAM533UEh58EpdhGD2IuG2ybWM7LUfb9gehZQ/7DbxILn0sKOkaoV8V IfjH2OslyjpqFUfdmMfNTmYUXI24cOKuUCF3ef2MoKXSrkFBOKxIT4uMDMzfE2Dgg7ZPq8sOj18 HKizUFWT5f3KorMxjNPo= X-Received: by 2002:a2e:b6cc:: with SMTP id m12mr11111019ljo.297.1634290421711; Fri, 15 Oct 2021 02:33:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwggzPUXaQRnFM+S/0uZv3xQAlgDu+sxhwU9RJ2sMW1US1HYojZdJvvBddR1FJkdvUnY2vQk9XD/gqiT8hhbyg= X-Received: by 2002:a2e:b6cc:: with SMTP id m12mr11111006ljo.297.1634290421546; Fri, 15 Oct 2021 02:33:41 -0700 (PDT) MIME-Version: 1.0 References: <1634153265-193315-1-git-send-email-vladimir.medvedkin@intel.com> <1634233699-197151-1-git-send-email-vladimir.medvedkin@intel.com> In-Reply-To: <1634233699-197151-1-git-send-email-vladimir.medvedkin@intel.com> From: David Marchand Date: Fri, 15 Oct 2021 11:33:30 +0200 Message-ID: To: Vladimir Medvedkin Cc: dev , "Wang, Yipeng1" , "Gobriel, Sameh" , Bruce Richardson , dpdk stable 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" Subject: Re: [dpdk-dev] [PATCH v3] test/hash: fix buffer overflow 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 Sender: "dev" On Thu, Oct 14, 2021 at 7:55 PM Vladimir Medvedkin wrote: > @@ -1607,6 +1611,17 @@ static struct rte_hash_parameters hash_params_ex = { > }; > > /* > + * Wrapper function around rte_jhash_32b. > + * It is required because rte_jhash_32b() accepts the length > + * as size of 4-byte units. > + */ > +static inline uint32_t > +test_jhash_32b(const void *k, uint32_t length, uint32_t initval) > +{ > + return rte_jhash_32b(k, length >> 2, initval); > +} I am confused. Does it mean that rte_jhash_32b is not compliant with rte_hash_create API? -- David Marchand