bogdanPricope replied on github web page:

platform/linux-generic/pktio/tap.c
line 105
@@ -412,6 +412,16 @@ static int tap_link_status(pktio_entry_t *pktio_entry)
                              pktio_entry->s.name + 4);
 }
 
+static int tap_mac_addr_set(pktio_entry_t *pktio_entry, const void *mac_addr)
+{
+       pkt_tap_t *tap = &pktio_entry->s.pkt_tap;
+
+       memcpy(tap->if_mac, mac_addr, ETH_ALEN);
+
+       return mac_addr_set_fd(tap->fd, (char *)pktio_entry->s.name + 4,


Comment:
Cleaning up the code (moving all common functions to a common file) is not the 
purpose of this PR.
Should be done in different PR and is under review in cloud-dev/2.0.

> bogdanPricope wrote
> mac_addr_get_fd() is also there and should be used for implementation of 
> .mac_set callback of all the related pktios (socket, socket_mmap, etc.).
> It is confusing and for 2.0 I moved all those function to common.h/c.


>> muvarov wrote
>>  mac_addr_set_fd() defined in socket.c and used in tap.c,  that is 
>> confising...


https://github.com/Linaro/odp/pull/232#discussion_r145152966
updated_at 2017-10-17 14:44:50

Reply via email to