From: Ferruh Yigit <ferruh.yigit@intel.com>
To: Vipin Varghese <vipin.varghese@intel.com>, dev@dpdk.org
Cc: deepak.k.jain@intel.com, amol.patel@intel.com
Subject: Re: [dpdk-dev] [PATCH v2] net/tap: allow user mac to be passed as args
Date: Tue, 16 Jan 2018 11:32:48 +0000 [thread overview]
Message-ID: <c3677d75-f5d6-2993-1092-25dec7ca1ec0@intel.com> (raw)
In-Reply-To: <1513872060-4758-1-git-send-email-vipin.varghese@intel.com>
On 12/21/2017 4:01 PM, Vipin Varghese wrote:
> Added fixes for user TAP user MAC
> 1) user format to RTE_PMD_REGISTER_PARAM_STRING
> 2) TAP to the RTE_LOG in absence of dynamic RTE_LOG
> 3) Boundary case for MAC string added
> > ---------------------------------------------------------------
>
> Other Details:
> 1) not to extract "string to mac" conversion to its own function
> 2) set_mac_type does not take any pmd or device name
> 3) Segault for boundary cases 'mac="01:01:01:01:01:01', not found
> 4) Added user MAC format string
Hi Vipin,
Patch version changes shouldn't be part of git commit. But it is good to put
them after "---" in commit log. Can you please update the commit log?
Also please add maintainer to the cc/to .
>
> Signed-off-by: Vipin Varghese <vipin.varghese@intel.com>
<...>
> - strncpy(macTemp, value, 18);
> -
> - macByte = strtok(macTemp, ":");
> - while ((macByte != NULL) &&
> - (strspn(macByte, "0123456789ABCDEFabcdef")) &&
> - (strspn((macByte + 1), "0123456789ABCDEFabcdef")) &&
> - (strlen(macByte) == 2)) {
> - user_mac[index] = strtoul(macByte, NULL, 16);
> - macByte = strtok(NULL, ":");
> + strncpy(mac_temp, value, 18);
> + mac_temp[19] = "\0";
This cause a build error [1], should be used '\0':
[1]
...drivers/net/tap/rte_eth_tap.c: In function ‘set_mac_type’:
...drivers/net/tap/rte_eth_tap.c:1467:18: error: assignment makes integer from
pointer without a cast [-Werror=int-conversion]
mac_temp[19] = "\0";
^
<....>
> - ETH_TAP_IFACE_ARG "=<string> "
> - ETH_TAP_SPEED_ARG "=<int> "
> - ETH_TAP_MAC_ARG "=" ETH_TAP_MAC_FIXED " "
> - ETH_TAP_REMOTE_ARG "=<string>");
> + ETH_TAP_IFACE_ARG "=<string> "
> + ETH_TAP_SPEED_ARG "=<int> "
> + ETH_TAP_MAC_ARG "=" ETH_TAP_MAC_FIXED "|" ETH_TAP_USER_MAC_FMT " "
> + ETH_TAP_REMOTE_ARG "=<string>");
This also build a build error [2] because of how ETH_TAP_USER_MAC_FMT defined [3].
[2]
.../drivers/net/tap/rte_eth_tap.c: At top level:
.../drivers/net/tap/rte_eth_tap.c:45:33: error: called object is not a function
or function pointer
#define ETH_TAP_IFACE_ARG "iface"
^
.../build/include/rte_dev.h:265:25: note: in definition of macro
‘RTE_PMD_REGISTER_PARAM_STRING’
__attribute__((used)) = str
^~~
.../drivers/net/tap/rte_eth_tap.c:1628:2: note: in expansion of macro
‘ETH_TAP_IFACE_ARG’
ETH_TAP_IFACE_ARG "=<string> "
^~~~~~~~~~~~~~~~~
.../drivers/net/tap/rte_eth_tap.c:1630:65: error: expected ‘,’ or ‘;’ before
string constant
ETH_TAP_MAC_ARG "=" ETH_TAP_MAC_FIXED "|" ETH_TAP_USER_MAC_FMT " "
^
.../build/include/rte_dev.h:265:25: note: in definition of macro
‘RTE_PMD_REGISTER_PARAM_STRING’
__attribute__((used)) = str
^~~
[3]
#define ETH_TAP_USER_MAC_FMT ("xx:xx:xx:xx:xx:xx")
parenthesis ...
next prev parent reply other threads:[~2018-01-16 11:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-30 19:49 [dpdk-dev] [PATCH v1] " Vipin Varghese
2017-12-07 20:11 ` Ferruh Yigit
2017-12-08 10:14 ` Pascal Mazon
2017-12-16 2:21 ` Varghese, Vipin
2017-12-21 16:01 ` [dpdk-dev] [PATCH v2] " Vipin Varghese
2018-01-16 11:32 ` Ferruh Yigit [this message]
2018-01-31 18:22 [dpdk-dev] [PATCH] net/tap: allow user MAC " Vipin Varghese
2018-02-05 15:54 ` [dpdk-dev] [PATCH v2] " Pascal Mazon
2018-02-05 15:58 ` Varghese, Vipin
2018-02-05 18:13 ` Varghese, Vipin
2018-02-05 18:42 ` Ferruh Yigit
2018-02-12 14:44 [dpdk-dev] [PATCH v1] " Vipin Varghese
2018-03-12 20:21 ` [dpdk-dev] [PATCH v2] " Vipin Varghese
2018-03-12 15:08 ` Ferruh Yigit
2018-03-12 15:38 ` Varghese, Vipin
2018-03-12 17:33 ` Stephen Hemminger
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=c3677d75-f5d6-2993-1092-25dec7ca1ec0@intel.com \
--to=ferruh.yigit@intel.com \
--cc=amol.patel@intel.com \
--cc=deepak.k.jain@intel.com \
--cc=dev@dpdk.org \
--cc=vipin.varghese@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).