Message ID | 1497898444-116702-2-git-send-email-bhanuprakash.bodireddy@intel.com |
---|---|
State | Accepted |
Headers | show |
On Mon, Jun 19, 2017 at 07:54:00PM +0100, Bhanuprakash Bodireddy wrote: > sorted_poll_list() returns the sorted list of rxqs mapped to PMD thread > along with the rxq count. Skip sorting the list if there are no rxqs > mapped to the PMD thread. This can be reproduced with manual pinning and > 'dpif-netdev/pmd-rxq-show' command. > > Also Clang reports that null argument is passed to qsort in this case. > > Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> Thanks! Applied to master and branch-2.7.
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index 2b65dc7..4b5b23b 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -884,10 +884,9 @@ sorted_poll_list(struct dp_netdev_pmd_thread *pmd, struct rxq_poll **list, i++; } ovs_assert(i == *n); + qsort(ret, *n, sizeof *ret, compare_poll_list); } - qsort(ret, *n, sizeof *ret, compare_poll_list); - *list = ret; }
sorted_poll_list() returns the sorted list of rxqs mapped to PMD thread along with the rxq count. Skip sorting the list if there are no rxqs mapped to the PMD thread. This can be reproduced with manual pinning and 'dpif-netdev/pmd-rxq-show' command. Also Clang reports that null argument is passed to qsort in this case. Signed-off-by: Bhanuprakash Bodireddy <bhanuprakash.bodireddy@intel.com> --- lib/dpif-netdev.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)