K 10 svn:author V 9 vmaffione K 8 svn:date V 27 2020-08-10T17:53:09.942100Z K 7 svn:log V 653 MFC r363378 iflib: initialize netmap with the correct number of descriptors In case the network device has a RX or TX control queue, the correct number of TX/RX descriptors is contained in the second entry of the isc_ntxd (or isc_nrxd) array, rather than in the first entry. This case is correctly handled by iflib_device_register() and iflib_pseudo_register(), but not by iflib_netmap_attach(). If the first entry is larger than the second, this can result in a panic. This change fixes the bug by introducing two helper functions that also lead to some code simplification. PR: 247647 Differential Revision: https://reviews.freebsd.org/D25541 END