freebsd-skq/sys/net
Eric Joyner afb7737237 iflib: use default ntxd and nrxd when user value is not power of 2
From Jake:
A user may set a sysctl to override the default number of Tx or Rx
descriptors. However, certain calculations in the iflib core expect the
number of descriptors to be a power of 2.

Update _iflib_assert to verify that all of the shared context parameters
for the number of descriptors are powers of 2.

Modify iflib_reset_qvalues to check that the provided isc_nrxd value is
a power of 2. If it's not, print a warning message and then use the
default value.

An alternative might be to try rounding the number down instead.
However, this creates problems in case the rounded down value is below
the minimum value that the driver would support.

Submitted by:	Jacob Keller <jacob.e.keller@intel.com>
Reviewed by:	marius@
MFC after:	1 week
Sponsored by:	Intel Corporation
Differential Revision:	https://reviews.freebsd.org/D19880
2019-05-10 00:41:42 +00:00
..
altq Reduce the time it takes the kernel to install a new PF config containing a large number of queues 2019-02-11 05:17:31 +00:00
bpf_buffer.c
bpf_buffer.h
bpf_filter.c
bpf_jitter.c Make UMA and malloc(9) return non-executable memory in most cases. 2018-06-13 17:04:41 +00:00
bpf_jitter.h Make UMA and malloc(9) return non-executable memory in most cases. 2018-06-13 17:04:41 +00:00
bpf_zerocopy.c
bpf_zerocopy.h
bpf.c Convert allocation of bpf_if in bpfattach2 from M_NOWAIT to M_WAITOK 2019-03-19 10:29:32 +00:00
bpf.h
bpfdesc.h Move BPFIF_* macro definitions into .c file, where struct bpf_if is 2018-06-19 10:34:45 +00:00
bridgestp.c bridge: Fix panic if the STP root is removed 2019-03-15 11:21:20 +00:00
bridgestp.h
dlt.h Re-apply r190640. 2018-05-31 09:11:21 +00:00
ethernet.h net: adjust randomized address bits 2019-04-17 17:18:43 +00:00
firewire.h
ieee8023ad_lacp.c Select lacp egress ports based on NUMA domain 2019-05-03 14:43:21 +00:00
ieee8023ad_lacp.h Select lacp egress ports based on NUMA domain 2019-05-03 14:43:21 +00:00
ieee_oui.h net: adjust randomized address bits 2019-04-17 17:18:43 +00:00
if_arp.h Improve ARP logging. 2019-03-09 01:12:59 +00:00
if_bridge.c net: adjust randomized address bits 2019-04-17 17:18:43 +00:00
if_bridgevar.h
if_clone.c Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
if_clone.h
if_dead.c
if_debug.c
if_disc.c Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
if_dl.h
if_edsc.c Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
if_enc.c New pfil(9) KPI together with newborn pfil API and control utility. 2019-01-31 23:01:03 +00:00
if_enc.h
if_epair.c Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
if_ethersubr.c net: adjust randomized address bits 2019-04-17 17:18:43 +00:00
if_fwsubr.c
if_gif.c Add handling for appearing/disappearing of ingress addresses to if_gif(4). 2018-10-21 18:06:15 +00:00
if_gif.h Add handling for appearing/disappearing of ingress addresses to if_gif(4). 2018-10-21 18:06:15 +00:00
if_gre.c Add GRE-in-UDP encapsulation support as defined in RFC8086. 2019-04-24 09:05:45 +00:00
if_gre.h Add GRE-in-UDP encapsulation support as defined in RFC8086. 2019-04-24 09:05:45 +00:00
if_ipsec.c Allow configuration of several ipsec interfaces with the same tunnel 2018-11-16 14:21:57 +00:00
if_ipsec.h
if_lagg.c Select lacp egress ports based on NUMA domain 2019-05-03 14:43:21 +00:00
if_lagg.h Select lacp egress ports based on NUMA domain 2019-05-03 14:43:21 +00:00
if_llatbl.c Mechanical cleanup of epoch(9) usage in network stack. 2019-01-09 01:11:19 +00:00
if_llatbl.h CK: update consumers to use CK macros across the board 2018-05-24 23:21:23 +00:00
if_llc.h
if_loop.c Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
if_me.c Add the check that current VNET is ready and access to srchash is allowed. 2018-10-23 13:11:45 +00:00
if_media.c
if_media.h if_media: Add new 2.5G/5G/25G/40G/50G/100G/200G/400G media types 2018-08-22 18:19:56 +00:00
if_mib.c
if_mib.h
if_pflog.h
if_pfsync.h
if_sppp.h
if_spppfr.c
if_spppsubr.c Replace read_random(9) with more appropriate arc4rand(9) KPIs 2019-04-04 01:02:50 +00:00
if_stf.c Do not perform DAD on stf(4) interfaces. 2019-03-30 18:00:44 +00:00
if_tap.h tun/tap: merge and rename to tuntap 2019-05-08 02:32:11 +00:00
if_tun.h
if_tuntap.c tuntap: Don't down tap interfaces if LINK0 is set 2019-05-09 18:54:29 +00:00
if_types.h
if_var.h Track device's NUMA domain in ifnet & alloc ifnet from NUMA local memory 2019-04-22 19:24:21 +00:00
if_vlan_var.h Add the ability to look up the 3b PCP of a VLAN interface. Use it in 2018-08-16 23:46:38 +00:00
if_vlan.c This commit adds the missing release mechanism for the 2019-02-13 14:57:59 +00:00
if_vxlan.c net: adjust randomized address bits 2019-04-17 17:18:43 +00:00
if_vxlan.h
if.c Track device's NUMA domain in ifnet & alloc ifnet from NUMA local memory 2019-04-22 19:24:21 +00:00
if.h Plug routing sysctl leaks. 2018-11-26 13:42:18 +00:00
ifdi_if.m
iflib_clone.c - Remove the unused ifc_link_irq and ifc_mtx_name members of struct iflib_ctx. 2019-05-06 20:56:41 +00:00
iflib_private.h Use busdma unconditionally in iflib 2018-11-27 20:01:05 +00:00
iflib.c iflib: use default ntxd and nrxd when user value is not power of 2 2019-05-10 00:41:42 +00:00
iflib.h - Remove the unused ifc_link_irq and ifc_mtx_name members of struct iflib_ctx. 2019-05-06 20:56:41 +00:00
ifq.h
mp_ring.c - Merge r338254 from cxgbe(4): 2019-05-09 11:34:46 +00:00
mp_ring.h mp_ring: avoid items offset difference between iflib and mp_ring 2019-01-03 23:06:05 +00:00
mppc.h
mppcc.c
mppcd.c
netisr_internal.h
netisr.c Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
netisr.h
netmap_legacy.h netmap: add support for multiple host rings 2019-03-18 12:22:23 +00:00
netmap_user.h netmap: add support for multiple host rings 2019-03-18 12:22:23 +00:00
netmap_virt.h netmap: align codebase to the current upstream (760279cfb2730a585) 2018-12-05 11:57:16 +00:00
netmap.h netmap: add support for multiple host rings 2019-03-18 12:22:23 +00:00
paravirt.h
pfil.c Most Ethernet drivers that potentially can run a pfil(9) hook with 2019-03-10 17:20:09 +00:00
pfil.h Most Ethernet drivers that potentially can run a pfil(9) hook with 2019-03-10 17:20:09 +00:00
pfkeyv2.h
pfvar.h pf :Use counter(9) in pf tables. 2019-03-15 11:08:44 +00:00
ppp_defs.h
radix_mpath.c Switch RIB and RADIX_NODE_HEAD lock from rwlock(9) to rmlock(9). 2018-06-16 08:26:23 +00:00
radix_mpath.h
radix.c Switch RIB and RADIX_NODE_HEAD lock from rwlock(9) to rmlock(9). 2018-06-16 08:26:23 +00:00
radix.h Fix typo. 2018-06-16 19:21:09 +00:00
raw_cb.c
raw_cb.h
raw_usrreq.c
rndis.h
route_var.h Existense of PCB route caching doesn't allow us to use new fast route 2019-05-08 23:39:24 +00:00
route.c Mechanical cleanup of epoch(9) usage in network stack. 2019-01-09 01:11:19 +00:00
route.h Existense of PCB route caching doesn't allow us to use new fast route 2019-05-08 23:39:24 +00:00
rss_config.c
rss_config.h
rtsock.c When sending a routing message, don't allow the user to set the 2019-04-14 10:18:14 +00:00
sff8436.h
sff8472.h
slcompress.c
slcompress.h
toeplitz.c
toeplitz.h
vnet.c With more excessive use of modules, more kernel parts working with 2018-10-30 20:45:15 +00:00
vnet.h Don't mark module data as static on RISC-V. 2018-09-12 08:05:33 +00:00