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 92E35A0A0E; Tue, 11 May 2021 15:09:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1ADEA40140; Tue, 11 May 2021 15:09:33 +0200 (CEST) Received: from mail-wm1-f44.google.com (mail-wm1-f44.google.com [209.85.128.44]) by mails.dpdk.org (Postfix) with ESMTP id DC76B4003E for ; Tue, 11 May 2021 15:09:31 +0200 (CEST) Received: by mail-wm1-f44.google.com with SMTP id n84so11131941wma.0 for ; Tue, 11 May 2021 06:09:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XyB96d9KT5W/fMvcF/gZVMcWBhO6NgBP0x8D3cvdpSk=; b=ia1T0YCWkyewuWKjVRqYfsfA9hlVG/Cx+zEwq0s11M/ej8mcIBkBcKJr9uEc12sw2u DptsTxdtnGVaEjQOl5dBPDuuk8HaAiIV+JENiroOwvcaQmNCJoG/z/Uw+fKAq/sQQ33D vJhNsqku2KY1boRX9HHnEE3Yh4iPpfaHIVraCkT6JpSIkQfvg2yafXWVUwlxhgF3DuL+ ujyV8RejKYdOXFkq4XRcP9nR3AWS3MNTCjxa9YmDbRsJkaVrANuYZumbGeZ6rLcKlbYz bF0PM/IxDK9FRK09t/3Hg/k0M3bSySZWv99U7yerE2mlTU0S2UsftHAwl7AgVpGyqW26 rTFA== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XyB96d9KT5W/fMvcF/gZVMcWBhO6NgBP0x8D3cvdpSk=; b=ZPQkcHbPRVb3QlvmA1I/EIWncG/rclTwY5OZ3Sg01Mtt6pa0OXuFGDjHrKgyidH+y+ pQ4B4CA3e+9lCPBLG0HYyF8lbQf91Jp4sCIGmgXjRFtRGBvwG0o8ww5eQmhxU/Ow9K7R EnoaLN4mlnYGvOALwx4C0RS/8NpvmEiQhYGcO+6oUkhfGrVHf8AWqzi377C1tLACYpHF W2MW7HvzgjMko1OOU6L/Gbx/cRg0FyvOBdm9kPUtZ2iAkWivTHKPgajk1icC7NnBoe+H 2v6YNIeyw3X5zsFYN9V3GV7S1zQC3Hov0xIBYBqqj986HsRjrbMhzuAoFhbeoAjyn6eb IPOw== X-Gm-Message-State: AOAM533Tjfz8NF1TpiuOsejBRTPZr49cm7+874MtJMEZJCTA5ALDjkOJ 63KyiNAaT+3jFxD+IH9VPujsfw== X-Google-Smtp-Source: ABdhPJxiIlwC/D7zIdl8mfrUA+yEVp5mJeAotQdZ8Hx2VJwtFclPSxeS4TyG9AYTqV7GfAtsEQY9MQ== X-Received: by 2002:a1c:35c6:: with SMTP id c189mr5300751wma.127.1620738571548; Tue, 11 May 2021 06:09:31 -0700 (PDT) Received: from 6wind.com ([2a01:e0a:5ac:6460:c065:401d:87eb:9b25]) by smtp.gmail.com with ESMTPSA id u9sm24429159wmc.38.2021.05.11.06.09.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 May 2021 06:09:31 -0700 (PDT) Date: Tue, 11 May 2021 15:09:30 +0200 From: Olivier Matz To: David Marchand Cc: dev@dpdk.org, ian.stokes@intel.com, ktraynor@redhat.com Message-ID: <20210511130930.GH1726@platinum> References: <20210506151426.28202-1-david.marchand@redhat.com> <20210506151426.28202-2-david.marchand@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210506151426.28202-2-david.marchand@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Subject: Re: [dpdk-dev] [PATCH 1/2] net: add endianness annotations to ethernet headers 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, May 06, 2021 at 05:14:25PM +0200, David Marchand wrote: > Spotted by sparse in OVS build: > > /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:789:27: > error: incorrect type in initializer (different base types) > /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:789:27: > expected unsigned short [usertype] ether_type > /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:789:27: > got restricted ovs_be16 [usertype] > /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:829:25: > error: incorrect type in initializer (different base types) > /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:829:25: > expected unsigned short [usertype] vlan_tci > /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:829:25: > got restricted ovs_be16 [usertype] > /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:830:26: > error: incorrect type in initializer (different base types) > /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:830:26: > expected unsigned short [usertype] eth_proto > /home/runner/work/ovs/ovs/dpdk-dir/build/include/rte_flow.h:830:26: > got restricted ovs_be16 [usertype] > > This was not caught before as no code in headers was using those fields. > This changed with commit 6f2168b69aee ("ethdev: reuse ethernet header > definition in flow item") and commit a56a262e3408 ("ethdev: reuse VLAN > header definition in flow item"). > > Signed-off-by: David Marchand I was wondering if it wouldn't be safer to change the initializer instead of the structure definition, to avoid any API breakage. But after some off-list discussions, it appears that there is no API breakage (rte_be16_t is a typedef to uint16_t), and this kind of changes was already done in the past. Acked-by: Olivier Matz