From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E5EB0A052E; Mon, 9 Mar 2020 20:13:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8EF391C001; Mon, 9 Mar 2020 20:13:49 +0100 (CET) Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id 920511BFF9 for ; Mon, 9 Mar 2020 20:13:48 +0100 (CET) Received: by mail-pf1-f194.google.com with SMTP id 23so3471573pfj.1 for ; Mon, 09 Mar 2020 12:13:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RO4GxD9S4krXKtfcE2FaQ3Bzg0aNQNTjDx39PFDnfJs=; b=EOwIx3lQDA6VSL3v44puUmw0vx2V09Ynp5xORwI9iFnd6oJ06tJd57w/hcdYl+GS33 ZiVFSAuXIuBjp6EKOio/kD4AKy4V2YguBX8rlA6gQlH8J94t1aYbIdUYFNPrWouvb6Lq 7VBw1lA42JLvjd5J8OAQQIzMKxn3FG2RYI5rjbMSaVwkGY7eOAyqHdAEHC4i49fWdDFI I4/xHPXe+je2+2oxDss4ZfbrF3aUr6Njl9ulnP6G1AX5AXrVkvmEf9nEszOFlE5C9vCY 8iyoNsiz8xHUrl7gy+ZrWYCSpw64sXTUDwwQIzMCFmL7QoOjU1TGhzjlMmjl0tDBu7ch cR6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RO4GxD9S4krXKtfcE2FaQ3Bzg0aNQNTjDx39PFDnfJs=; b=RHoF6EUZbx+5NbYr3Fj//+awF8vjukxU4rbKC2TgMhw+rIvXhZU3RoXhYmidyGq63/ sAy+n5txweB4UudbLJBMSeRe17w7XhRBceivk+Hd/3x2AQbuFe9sx0t9s7qYGDIdsYVQ pnLCElrsxpO31/vlcCm3cd02dzNjxZpyYUe3I5L5efLzAtO64rGeVY9yx6cwv+8oUhV5 yY0z0EQu3onOurue52AWf9jzDKx4OaP20dt2n9pu2DcXEkvVP2d0QrioLaepCBPSw1U+ LVTvILtpOSjXOdQFF2eEJBj5Jubx3AFyWG59s5/XSvwdrkQygmIs7MVbb43o8g+wMDbF mbFA== X-Gm-Message-State: ANhLgQ1bWUv3wk2HJq9L7Q/6wouSHjr9l6+teoTnyk4S4IH/+HH3iEhM KQIp1o9vWRnKwHJ9bi0H+mD56Q== X-Google-Smtp-Source: ADFU+vumsMc/FG3Vy8gVbF1rcMSkkYWCkpp6I6BEE1lai4Bl8FATNjrLW3hDn+wAo6ZyxuoWFSpr8A== X-Received: by 2002:a63:a601:: with SMTP id t1mr17803498pge.23.1583781227424; Mon, 09 Mar 2020 12:13:47 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id w17sm3210698pfi.59.2020.03.09.12.13.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2020 12:13:47 -0700 (PDT) Date: Mon, 9 Mar 2020 12:13:44 -0700 From: Stephen Hemminger To: "Medvedkin, Vladimir" Cc: Andrzej Ostruszka , dev@dpdk.org, Bruce Richardson Message-ID: <20200309121344.4da23f2b@hermes.lan> In-Reply-To: <9567b22d-96d2-edea-a3f4-42f7a83d8fb3@intel.com> References: <20200303125345.26317-1-aostruszka@marvell.com> <2d22e4b0-6b3c-08c0-e687-b7b420c53150@intel.com> <20200309085236.4938969b@hermes.lan> <9567b22d-96d2-edea-a3f4-42f7a83d8fb3@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] lpm6: make IPv6 addresses immutable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 Mon, 9 Mar 2020 18:02:21 +0000 "Medvedkin, Vladimir" wrote: > On 09/03/2020 15:52, Stephen Hemminger wrote: > > On Mon, 9 Mar 2020 13:38:53 +0000 > > "Medvedkin, Vladimir" wrote: > > > >> Hi Andrze, > >> > >> Adding const qualifier for bulk lookup leads to compilation problems > >> (see http://c-faq.com/ansi/constmismatch.html) > >> Also I don't think it would be good for usability to make users > >> explicitly cast to (const uint8_t **) when passing 'ips' argument. I'd > >> suggest leaving lookup_bulk as is. > > > > Please give a more concrete example. There is no need for explicit cast > > in current C. > > Hi Stephen, > > In theory, i agree - all modern versions of GCC don't give warnings for > this code. The problem is, we don't only support modern versions of GCC. > For a "more concrete example", see the following error in gcc-4.8 on > CentOS 7: > > http://mails.dpdk.org/archives/test-report/2020-March/119455.html > > I have reproduced this on my non-CentOS machine with gcc4.8, so it > appears to be gcc4.8 specific rather than CentOS-specific. That said, > the same email contains a compile check from RHEL7 with the same > compiler version, and it didn't trigger the warning, and also it seems > to be that only meson build has triggered the warning (while i have > reproduced it with make on my machine). > > So, i think it is best to leave lookup_bulk as is, and add const > qualifiers in other places (for const uint8_t *). > Agree, just drop it from the bulk functions. The array of array semantics is confusing compiler (and users).