From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id 31050B62 for ; Mon, 14 Dec 2015 16:42:45 +0100 (CET) Received: by mail-wm0-f43.google.com with SMTP id n186so51922269wmn.0 for ; Mon, 14 Dec 2015 07:42:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:organization:user-agent :in-reply-to:references:mime-version:content-transfer-encoding :content-type; bh=feplKSm2GwfeIsR/MHlNiQsdaZgqqLa4u1Cm+qkfOmQ=; b=SYSMaz09AwJfKCRv5KRtlC5/X8G161kEH8xx1RbJe5/C1kgfvsrwxX58Zn8jbPV4pL jFkrNHPN1uutv16cDEwLc9oDyyUjT9otvwCTsdSlflziDVlBBEaW63q0HwtFOZ+Nf4wB QjtjRri3+UqL0FUQDIW7zLQ0wgyBJlT++AF3mJj6NdvkXd+twAc8fm85LVfz+iljb2db sDT0B3DCNSAHoGheGQ2RWU2Bu02H2RBsKCjMYYlXu1gNYtlUKC5DxoEMLFbBHOKtsf1f tsjSrmXgfeyU2j536G3DB8rthHKnGyZmFcGT1+MrWSUlY8jm8zpsuELBhbNo5pK49+Hd Bdig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=feplKSm2GwfeIsR/MHlNiQsdaZgqqLa4u1Cm+qkfOmQ=; b=GJsDZ2HUr1IZ//J12t7/s+Qnsuog3jfqhLG42k/eKIfeYmaHWbhxcSteV4EKSR5SFU 8Uh+SZvMvaYQnMu7qDFEhbOd3oGe72mHyk8tLgkZpHYYNml+fJdI6pD6AnLNvJDOGRRG WpNqMMZwzUh6IHseP6IMnwSrlQ0I1xAKXkP+YQlovsAhS5ydoTqtKWOtttW90QhdYqNX 6NkDlFGCjgsfrIG43SliRd9fURSvGIlCses1zXPK02yw4yd49z2qx8JcZ+ZQ8Nmrslzj nvdVI4GAS+59LofG77AKoLh++/Ckq2TuU1DNykGDxOzoNmOqbpmlpuoNLKZb/7dtwphN eZkA== X-Gm-Message-State: ALoCoQkpb6kMRrSMxpdPZxxXH7yhh5HoyQY5X3KZixdKzqOZTmVUf2HyV802fnsu4NJNC2NRYX7ZqH/oKDWLWd0vwh2s93ZOiA== X-Received: by 10.28.141.140 with SMTP id p134mr25087586wmd.6.1450107764975; Mon, 14 Dec 2015 07:42:44 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by smtp.gmail.com with ESMTPSA id w4sm30314731wje.49.2015.12.14.07.42.43 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 14 Dec 2015 07:42:44 -0800 (PST) From: Thomas Monjalon To: Bruce Richardson Date: Mon, 14 Dec 2015 16:41:28 +0100 Message-ID: <3122170.KpSg9jKaig@xps13> Organization: 6WIND User-Agent: KMail/4.14.10 (Linux/4.1.6-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20151214153055.GA37304@bricha3-MOBL3> References: <1449790022-24126-1-git-send-email-stephen@networkplumber.org> <2618453.kF8WIUB5uB@xps13> <20151214153055.GA37304@bricha3-MOBL3> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH] doc: announce API change for rte_ether.h X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Dec 2015 15:42:45 -0000 2015-12-14 15:30, Bruce Richardson: > On Mon, Dec 14, 2015 at 03:54:06PM +0100, Thomas Monjalon wrote: > > 2015-12-10 15:27, Stephen Hemminger: > > > Plan to change to version of struct ether_addr in > > > DPDK 2.3. The change in DPDK source is trivial but it will impact > > > source compatablilty therefore notification is necessary. > > [...] > > > +* librte_ether: The structure ether_addr in DPDK will be replaced > > > + by using the standard header file . The structure > > > + size will be the same (no ABI impact), but the structure field name > > > + will change from addr_bytes[] to ether_addr_octet[]. > > > > > > Acked-by: Thomas Monjalon > > > > Any other votes for this API cleanup? > > > Are the structures and contents of net/ethernet.h the same on both Linux and > FreeBSD? Good question. I'm afraid the answer is no. In FreeBSD, it is ether_addr.octet[]. Linux ----- struct ether_addr { u_int8_t ether_addr_octet[ETH_ALEN]; } __attribute__ ((__packed__)); struct ether_header { u_int8_t ether_dhost[ETH_ALEN]; /* destination eth addr */ u_int8_t ether_shost[ETH_ALEN]; /* source ether addr */ u_int16_t ether_type; /* packet type ID field */ } __attribute__ ((__packed__)); FreeBSD ------- struct ether_addr { u_char octet[ETHER_ADDR_LEN]; } __packed; struct ether_header { u_char ether_dhost[ETHER_ADDR_LEN]; u_char ether_shost[ETHER_ADDR_LEN]; u_short ether_type; } __packed;