From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <stephen@networkplumber.org>
Received: from mail-pg0-f67.google.com (mail-pg0-f67.google.com [74.125.83.67])
 by dpdk.org (Postfix) with ESMTP id 303EB271
 for <dev@dpdk.org>; Mon, 18 Dec 2017 22:20:00 +0100 (CET)
Received: by mail-pg0-f67.google.com with SMTP id j9so9652725pgc.11
 for <dev@dpdk.org>; Mon, 18 Dec 2017 13:20:00 -0800 (PST)
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=BryZEhGjzmksUY0jAnbk7+LlZVkd3erU5uEvTNDkbns=;
 b=gI8XMyZx1vHYzzGY6HzmdDXQ9usASbVZfCvccwBzcnwX5M3RPwkgClJBFHhrk8nG3j
 0iZkA5hpsDX2LEST46P3kAWDgPWhbbw3bgrZ15iMfAC1iFOJtnLRuKRAHBJTekb8Fzdd
 CV3YlKO96L/w+Y/GtVVp26p+APxydW1rUpeaoNPWicbJ8d9ecSKMox5jrrELTgcOFphU
 rtsJbhvwHgwGqTUzeF+eoYWTqolKHJpLSOjuFtbbs6vSmn0C3eOZHqlxdzuD21ylhDk9
 TAstKDwYp0VsfDnXo+r+J3y16G7YsaRrp8g/XW4SHmECbDkoLOYhzfQbQI8xQkVXZcMU
 Srvg==
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=BryZEhGjzmksUY0jAnbk7+LlZVkd3erU5uEvTNDkbns=;
 b=JJpc4+QDCR7fNvMPxB77I2Yk0/C7YTJOrD+HoGo2NlS/Dmk5+cEYsggFrwYso5JYf8
 tnYqg1xoOnUaEqyQy7jzDbF1Mg56mTBfd/Ga8jY+vD1clw/tBhJ8Yx9XCaEnpdQI0l17
 HkxKlOaEp/WNu33oCfw68iGxmvnKzLUDyNKECkfkhaE/RfwmlJGiHGZ2nEAcI+s+wllg
 rZd4cpD+M9pwuNX715agyVeqg4LoUbpCvdlhk52XLmM4T9mYl0zB0DoHH+gw9DXZidSJ
 pKXp9F+f0CV7K2Vl5yjwWF3pA8+6+inDbYVHo78iijoXIQ6pVOL3q1UPyxhVCWbvNdRt
 ZbDw==
X-Gm-Message-State: AKGB3mJTdZ33/lqhrO/Y7MpcdwL2U9emDfd66bGMaOstmUKqBksvwy7T
 XDJYTXidPzusbcoA0nyxQvNNkF4eW9g=
X-Google-Smtp-Source: ACJfBos/S7kRwfyx9mctx0WY96CFXKmOTZ/FqllZt0XNZTd0iHCwTzQvvKaQu3ibjc2vkHj5D/kLfQ==
X-Received: by 10.99.111.8 with SMTP id k8mr866750pgc.74.1513632000150;
 Mon, 18 Dec 2017 13:20:00 -0800 (PST)
Received: from xeon-e3 (204-195-18-133.wavecable.com. [204.195.18.133])
 by smtp.gmail.com with ESMTPSA id y3sm27348028pff.122.2017.12.18.13.19.59
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Mon, 18 Dec 2017 13:19:59 -0800 (PST)
Date: Mon, 18 Dec 2017 13:19:57 -0800
From: Stephen Hemminger <stephen@networkplumber.org>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: Adrien Mazarguil <adrien.mazarguil@6wind.com>, dev@dpdk.org, Ferruh
 Yigit <ferruh.yigit@intel.com>
Message-ID: <20171218131957.3909ca1a@xeon-e3>
In-Reply-To: <3086746.YUGYodTZhn@xps>
References: <20171124172132.GW4062@6wind.com> <20171218102629.43798de2@xeon-e3>
 <20171218202139.GE4062@6wind.com> <3086746.YUGYodTZhn@xps>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Subject: Re: [dpdk-dev] [PATCH v1 2/3] net/hyperv: implement core
 functionality
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Dec 2017 21:20:01 -0000

On Mon, 18 Dec 2017 22:03:55 +0100
Thomas Monjalon <thomas@monjalon.net> wrote:

> > 
> > Good question. For the following reasons:
> > 
> > - I forgot about the existence of ether_ntoa() and didn't look it up seeing
> >   struct ether_addr is (re-)defined by rte_ether.h. What happens when one
> >   includes netinet/ether.h together with that file results in various
> >   conflicts that trigger a compilation error. This problem should be
> >   addressed first.
> > 
> > - ether_ntoa() returns a static buffer and is not reentrant, ether_ntoa_r()
> >   is but as a GNU extension, I'm not sure it exists on other OSes. Even if
> >   this driver is currently targeted at Linux, this is likely not the case
> >   for other DPDK code relying on rte_ether.h.
> > 
> > - I had ether_addr_from_str()'s code already ready and lying around for a
> >   future update in testpmd's flow command parser. No other MAC-48 conversion
> >   function I know of is as flexible as this version. The ability to omit ":"
> >   and entering partial addresses is a big plus IMO.
> > 
> > I think both can coexist on their own merits. Since rte_ether.h needs to be
> > fixed either way, how about I move this function in a separate commit and
> > address the conflict with netinet/ether.h while there?  
> 
> Looks to be a good plan.

Agree, rte_ether is where it should go. Please put functions for parsing there.
The name and logic conflict between netinet/ether.h and rte is both a blessing
and a curse. Although the definitions of ether_addr overlap, they are equivalent.