Hi Ferruh, You are correct about this, I will add initialization send a next version patch.
> -----Original Message----- > From: Yigit, Ferruh > Sent: Tuesday, March 6, 2018 4:42 PM > To: Varghese, Vipin <vipin.vargh...@intel.com>; dev@dpdk.org; > pascal.ma...@6wind.com > Cc: Jain, Deepak K <deepak.k.j...@intel.com> > Subject: Re: [PATCH v1] net/tap: allow user MAC to be passed as args > > On 2/12/2018 2:44 PM, Vipin Varghese wrote: > > Allow TAP PMD to pass user desired MAC address as argument. > > The argument value is processed as string delimited by ':', is parsed > > and converted to HEX MAC address after validation. > > > > Signed-off-by: Vipin Varghese <vipin.vargh...@intel.com> > > Signed-off-by: Pascal Mazon <pascal.ma...@6wind.com> > > <...> > > > @@ -1589,7 +1630,7 @@ enum ioctl_mode { > > int speed; > > char tap_name[RTE_ETH_NAME_MAX_LEN]; > > char remote_iface[RTE_ETH_NAME_MAX_LEN]; > > - int fixed_mac_type = 0; > > + struct ether_addr user_mac; > > > > name = rte_vdev_device_name(dev); > > params = rte_vdev_device_args(dev); > > @@ -1626,7 +1667,7 @@ enum ioctl_mode { > > ret = rte_kvargs_process(kvlist, > > ETH_TAP_MAC_ARG, > > &set_mac_type, > > - &fixed_mac_type); > > + &user_mac); > > if (ret == -1) > > goto leave; > > } > > @@ -1637,7 +1678,7 @@ enum ioctl_mode { > > RTE_LOG(NOTICE, PMD, "Initializing pmd_tap for %s as %s\n", > > name, tap_name); > > > > - ret = eth_dev_tap_create(dev, tap_name, remote_iface, > fixed_mac_type); > > + ret = eth_dev_tap_create(dev, tap_name, remote_iface, &user_mac); > > "user_mac" without initial value is leading error when no "mac" argument is > provided. It should be zeroed out.