From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v1 2/3] net/hyperv: implement core functionality Date: Mon, 18 Dec 2017 13:19:57 -0800 Message-ID: <20171218131957.3909ca1a@xeon-e3> 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 Cc: Adrien Mazarguil , dev@dpdk.org, Ferruh Yigit To: Thomas Monjalon Return-path: 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 ; Mon, 18 Dec 2017 22:20:00 +0100 (CET) Received: by mail-pg0-f67.google.com with SMTP id j9so9652725pgc.11 for ; Mon, 18 Dec 2017 13:20:00 -0800 (PST) In-Reply-To: <3086746.YUGYodTZhn@xps> 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, 18 Dec 2017 22:03:55 +0100 Thomas Monjalon 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.