From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH 5/6] xen: dont create dependency on cmdline library Date: Fri, 07 Mar 2014 10:13:40 -0800 Message-ID: <20140307181430.240987691@vyatta.com> References: <20140307181335.024904493@vyatta.com> Cc: dev-VfR2kkLFssw@public.gmane.org, Stephen Hemminger To: "Venkatesan, Venky" Return-path: Content-Disposition: inline; filename=xen-eth-aton.patch List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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