Re: [dpdk-dev] [PATCH] ether: fix invalid string length in ethdev name comparison

2018-02-27 Thread Mohammad Abdul Awal
On 27/02/2018 00:15, Ananyev, Konstantin wrote: -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Mohammad Abdul Awal + len1 = strlen(name); for (pid = 0; pid < RTE_MAX_ETHPORTS; pid++) { + len2 = strlen(rte_eth_dev_shared_data->data[

Re: [dpdk-dev] [PATCH] ether: fix invalid string length in ethdev name comparison

2018-02-26 Thread Ananyev, Konstantin
> -Original Message- > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Mohammad Abdul Awal > Sent: Monday, February 26, 2018 11:22 PM > To: tho...@monjalon.net > Cc: rke...@gmail.com; dev@dpdk.org; Awal, Mohammad Abdul > > Subject: [dpdk-dev] [PATCH] ethe

[dpdk-dev] [PATCH] ether: fix invalid string length in ethdev name comparison

2018-02-26 Thread Mohammad Abdul Awal
The current code compares two strings upto the length of 1st string (searched name). If the 1st string is prefix of 2nd string (existing name), the string comparison returns the port_id of earliest prefix matches. This patch fixes the bug by comparing the strings upto the length of larger string.