[dpdk-dev,v2,1/4] net/af_packet: add iface name to internals
Checks
Commit Message
This will be used by later changes to determine the underlying linux
interface.
Signed-off-by: Charles (Chas) Williams <ciwillia@brocade.com>
---
drivers/net/af_packet/rte_eth_af_packet.c | 4 ++++
1 file changed, 4 insertions(+)
Comments
On 1/5/2017 1:53 PM, Charles (Chas) Williams wrote:
> This will be used by later changes to determine the underlying linux
> interface.
>
> Signed-off-by: Charles (Chas) Williams <ciwillia@brocade.com>
Hi Charles,
Independent from the patch content,
it will be useful if you can send new patchset as reply to previous one,
this way all patches will be in same mail thread, this will help to
trace/review them, also it will be easier to find them in mail archive
in the future.
Another thing is, if you can add a version diff in the comment log,
after "---", that helps others to understand what has been changed in
this new version.
Thanks,
ferruh
<...>
On 1/5/2017 1:53 PM, Charles (Chas) Williams wrote:
> This will be used by later changes to determine the underlying linux
> interface.
>
> Signed-off-by: Charles (Chas) Williams <ciwillia@brocade.com>
Series Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
On 1/16/2017 2:31 PM, Ferruh Yigit wrote:
> On 1/5/2017 1:53 PM, Charles (Chas) Williams wrote:
>> This will be used by later changes to determine the underlying linux
>> interface.
>>
>> Signed-off-by: Charles (Chas) Williams <ciwillia@brocade.com>
>
> Series Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Series applied to dpdk-next-net/master, thanks.
@@ -99,6 +99,7 @@ struct pmd_internals {
unsigned nb_queues;
int if_index;
+ char *if_name;
struct ether_addr eth_addr;
struct tpacket_req req;
@@ -532,6 +533,7 @@ rte_pmd_init_internals(const char *name,
name);
goto error_early;
}
+ (*internals)->if_name = strdup(pair->value);
(*internals)->if_index = ifr.ifr_ifindex;
if (ioctl(sockfd, SIOCGIFHWADDR, &ifr) == -1) {
@@ -723,6 +725,7 @@ rte_pmd_init_internals(const char *name,
((*internals)->rx_queue[q].sockfd != qsockfd))
close((*internals)->rx_queue[q].sockfd);
}
+ free((*internals)->if_name);
rte_free(*internals);
error_early:
rte_free(data);
@@ -891,6 +894,7 @@ rte_pmd_af_packet_remove(const char *name)
rte_free(internals->rx_queue[q].rd);
rte_free(internals->tx_queue[q].rd);
}
+ free(internals->if_name);
rte_free(eth_dev->data->dev_private);
rte_free(eth_dev->data);