From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f171.google.com (mail-pd0-f171.google.com [209.85.192.171]) by dpdk.org (Postfix) with ESMTP id 9C4306831 for ; Fri, 7 Mar 2014 19:13:03 +0100 (CET) Received: by mail-pd0-f171.google.com with SMTP id r10so4349773pdi.30 for ; Fri, 07 Mar 2014 10:14:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:user-agent:date:from:to:cc:subject :references:content-disposition; bh=StyIFEktocs+NhJCSUB7lzP6XxlPh7d5PW8YyJgyt8Y=; b=M+x0TF/2PhbohXER2fLrEeApHgYW2sKxovQzm263VEOuxg8TtZetqjpSlCRD6/xjsb Dx6MgMn920T486TAkqsSSRXqqNtc/FBQ21r+SawlsBeERTobC0GJg9Q+pOIpnExRBHQP c1eP1uNWP76fIxh9VxSez0O32ns7fTDJhxR7T5+/t4xvmfclmJmIiNyAm+VtgvgCO3sR ECOyqq8L0r2vAWCwdIEl2fr5csTzWUel0zQs/2LRI9RbEmDooV2sUReQCBV6luP9P/Py YyMit0LDAkY8UP/XUsP+9SEFV3DEKZHroAMcBnLv9aBzn2cUfcQJ4oT0CCJKwmmd4lpV 77VQ== X-Gm-Message-State: ALoCoQmKMTu9lbSQ5AGciUm04lwUsJJc9qBzsIj0wB4fvYpEYLBZVmiXxqvksgRISmjYNw0DvRoH X-Received: by 10.66.155.133 with SMTP id vw5mr23875582pab.124.1394216072146; Fri, 07 Mar 2014 10:14:32 -0800 (PST) Received: from localhost (static-50-53-83-51.bvtn.or.frontiernet.net. [50.53.83.51]) by mx.google.com with ESMTPSA id vg1sm40070488pbc.44.2014.03.07.10.14.30 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 07 Mar 2014 10:14:31 -0800 (PST) Message-Id: <20140307181430.240987691@vyatta.com> User-Agent: quilt/0.60-1 Date: Fri, 07 Mar 2014 10:13:40 -0800 From: Stephen Hemminger To: "Venkatesan, Venky" References: <20140307181335.024904493@vyatta.com> Content-Disposition: inline; filename=xen-eth-aton.patch Cc: dev@dpdk.org, Stephen Hemminger Subject: [dpdk-dev] [PATCH 5/6] xen: dont create dependency on cmdline library 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: Fri, 07 Mar 2014 18:13:04 -0000 The driver should not introduce an unnecessary dependency on the cmdline code. We don't build that code since it is not used in our product. Signed-off-by: Stephen Hemminger --- lib/librte_pmd_xenvirt/rte_eth_xenvirt.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/librte_pmd_xenvirt/rte_eth_xenvirt.c b/lib/librte_pmd_xenvirt/rte_eth_xenvirt.c index d844845..42a20ba 100644 --- a/lib/librte_pmd_xenvirt/rte_eth_xenvirt.c +++ b/lib/librte_pmd_xenvirt/rte_eth_xenvirt.c @@ -53,8 +53,6 @@ #include #include #include -#include -#include #include "rte_xen_lib.h" #include "virtqueue.h" @@ -63,6 +61,9 @@ #define VQ_DESC_NUM 256 #define VIRTIO_MBUF_BURST_SZ 64 +/* defined in but that has conflicts with rte_ethdev.h */ +extern struct ether_addr *ether_aton(const char *); + /* virtio_idx is increased after new device is created.*/ static int virtio_idx = 0; @@ -584,15 +585,14 @@ rte_eth_xenvirt_parse_args(struct xenvirt_dict *dict, if (!strncmp(pair[0], RTE_ETH_XENVIRT_MAC_PARAM, sizeof(RTE_ETH_XENVIRT_MAC_PARAM))) { - if (cmdline_parse_etheraddr(NULL, - pair[1], - &dict->addr) < 0) { + struct ether_addr *ea = ether_aton(pair[1]); + if (ea == NULL) { RTE_LOG(ERR, PMD, "Invalid %s device ether address\n", name); goto err; } - + ether_addr_copy(ea, &dict->addr); dict->addr_valid = 1; } } -- 1.7.10.4