kni: fix type for MAC address
The type for MAC address should be unsigned.
Fixes: 1cfe212ed1
("kni: support MAC address change")
Cc: stable@dpdk.org
Signed-off-by: Jie Pan <panjie5@jd.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Rami Rosen <ramirose@gmail.com>
This commit is contained in:
parent
8ce1fdea09
commit
c629829f02
@ -447,7 +447,7 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
|
||||
ether_addr_copy(net_dev->dev_addr, kni->lad_dev->dev_addr);
|
||||
else {
|
||||
/* if user has provided a valid mac address */
|
||||
if (is_valid_ether_addr((unsigned char *)(dev_info.mac_addr)))
|
||||
if (is_valid_ether_addr(dev_info.mac_addr))
|
||||
memcpy(net_dev->dev_addr, dev_info.mac_addr, ETH_ALEN);
|
||||
else
|
||||
/*
|
||||
|
@ -127,7 +127,7 @@ struct rte_kni_device_info {
|
||||
/* mbuf size */
|
||||
unsigned mbuf_size;
|
||||
unsigned int mtu;
|
||||
char mac_addr[6];
|
||||
uint8_t mac_addr[6];
|
||||
};
|
||||
|
||||
#define KNI_DEVICE "kni"
|
||||
|
@ -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;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user