All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen-OTpzqLSitTUnbdJkjeBofR2eb7JE58TQ@public.gmane.org>
To: "Venkatesan,
	Venky" <venky.venkatesan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: dev-VfR2kkLFssw@public.gmane.org,
	Stephen Hemminger
	<shemming-43mecJUBy8ZBDgjK7y7TUQ@public.gmane.org>
Subject: [PATCH 5/6] xen: dont create dependency on cmdline library
Date: Fri, 07 Mar 2014 10:13:40 -0800	[thread overview]
Message-ID: <20140307181430.240987691@vyatta.com> (raw)
In-Reply-To: 20140307181335.024904493@vyatta.com

[-- Attachment #1: xen-eth-aton.patch --]
[-- Type: text/plain, Size: 1593 bytes --]

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 <shemming-43mecJUBy8ZBDgjK7y7TUQ@public.gmane.org>

---
 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 <rte_malloc.h>
 #include <rte_memcpy.h>
 #include <rte_string_fns.h>
-#include <cmdline_parse.h>
-#include <cmdline_parse_etheraddr.h>
 
 #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 <netinet/ether.h> 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

  parent reply	other threads:[~2014-03-07 18:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-07 18:13 [PATCH 0/6] DPDK 1.6.1 fixes Stephen Hemminger
2014-03-07 18:13 ` [PATCH 1/6] rte_mbuf: copy offload flags when doing attach/clone of mbuf Stephen Hemminger
     [not found]   ` <20140307181421.045171437-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
2014-03-24 18:21     ` Thomas Monjalon
2014-03-07 18:13 ` [PATCH 2/6] qos: use rte_zmalloc instead of memzone for allocation Stephen Hemminger
     [not found]   ` <20140307181423.371047493-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
2014-03-24 18:30     ` Thomas Monjalon
2014-03-07 18:13 ` [PATCH 3/6] rte_jhash: make arg to rte_jhash2 const Stephen Hemminger
     [not found]   ` <20140307181425.176731410-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
2014-03-24 18:22     ` Thomas Monjalon
2014-03-07 18:13 ` [PATCH 4/6] mempool: use GCC push/pop Stephen Hemminger
     [not found]   ` <20140307181427.254643901-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
2014-03-24 18:23     ` Thomas Monjalon
2014-03-07 18:13 ` Stephen Hemminger [this message]
     [not found]   ` <20140307181430.240987691-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
2014-03-24 21:01     ` [PATCH 5/6] xen: dont create dependency on cmdline library Thomas Monjalon
2014-03-07 18:13 ` [PATCH 6/6] ivshmem: fix errors identified by hardening Stephen Hemminger
     [not found]   ` <20140307181432.206702017-ZtmgI6mnKB3QT0dZR+AlfA@public.gmane.org>
2014-04-17 13:51     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140307181430.240987691@vyatta.com \
    --to=stephen-otpzqlsittunbdjkjebofr2eb7je58tq@public.gmane.org \
    --cc=dev-VfR2kkLFssw@public.gmane.org \
    --cc=shemming-43mecJUBy8ZBDgjK7y7TUQ@public.gmane.org \
    --cc=venky.venkatesan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.