From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id C75CCA0096
	for <public@inbox.dpdk.org>; Tue,  9 Apr 2019 21:48:01 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id 45DD15688;
	Tue,  9 Apr 2019 21:48:00 +0200 (CEST)
Received: from mga17.intel.com (mga17.intel.com [192.55.52.151])
 by dpdk.org (Postfix) with ESMTP id 8DB675681
 for <dev@dpdk.org>; Tue,  9 Apr 2019 21:47:58 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga006.jf.intel.com ([10.7.209.51])
 by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 09 Apr 2019 12:47:57 -0700
X-IronPort-AV: E=Sophos;i="5.60,330,1549958400"; d="scan'208";a="134348823"
Received: from fyigit-mobl.ger.corp.intel.com (HELO [10.237.221.46])
 ([10.237.221.46])
 by orsmga006-auth.jf.intel.com with ESMTP/TLS/AES128-SHA;
 09 Apr 2019 12:47:56 -0700
To: Jie Pan <panjie5@jd.com>, ferruh.yigit@intel.com
Cc: dev@dpdk.org
References: <1548301983-20020-1-git-send-email-panjie5@jd.com>
From: "Yigit, Ferruh" <ferruh.yigit@linux.intel.com>
Message-ID: <169db6f9-fed9-abb2-27c9-68e6fac8a9f7@linux.intel.com>
Date: Tue, 9 Apr 2019 20:47:52 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101
 Thunderbird/60.6.1
MIME-Version: 1.0
In-Reply-To: <1548301983-20020-1-git-send-email-panjie5@jd.com>
Content-Type: text/plain; charset="UTF-8"
Content-Language: en-US
Content-Transfer-Encoding: 7bit
Subject: Re: [dpdk-dev] [PATCH] lib/librte_kni: fix the type for mac address
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>
Message-ID: <20190409194752.glEVGVFyjJF270yAKUX2JBKYT6CzA7GrT2uY-6-Oly4@z>

On 1/24/2019 3:53 AM, Jie Pan wrote:
> The type for mac address in struct rte_kni_conf should be unsigned.
> 
> Signed-off-by: Jie Pan <panjie5@jd.com>
> ---
>  lib/librte_kni/rte_kni.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/librte_kni/rte_kni.h b/lib/librte_kni/rte_kni.h
> index 02ca43b..d44496c 100644
> --- a/lib/librte_kni/rte_kni.h
> +++ b/lib/librte_kni/rte_kni.h
> @@ -68,7 +68,7 @@ struct rte_kni_conf {
>  
>  	__extension__
>  	uint8_t force_bind : 1; /* Flag to bind kernel thread */
> -	char mac_addr[ETHER_ADDR_LEN]; /* MAC address assigned to KNI */
> +	uint8_t mac_addr[ETHER_ADDR_LEN]; /* MAC address assigned to KNI */
>  	uint16_t mtu;
>  };
>  
> 


Suggested title:
kni:  fix the type for MAC address

In commit log, needs:
"
Fixes: 1cfe212ed17a ("kni: support MAC address change")
Cc: stable@dpdk.org
"

Hi Jie,

What do you think about 'rte_kni_common.h', 'struct rte_kni_device_info' 'char
mac_addr[6];' field, seems added with same patch adds above 'mac_addr', does it
make sense to fix it too?
also "(unsigned char *)(dev_info.mac_addr)" in 'kni_misc.c'...
If so can you please send a new version with above fixes?

Thanks,
ferruh