mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-25 11:37:56 +00:00
1e413cf932
queues (which we call slices). The NIC will steer traffic into up to hw.mxge.max_slices different receive rings based on a configurable hash type (hw.mxge.rss_hash_type). Currently the driver defaults to using a single slice, so the default behavior is unchanged. Also, transmit from non-zero slices is disabled currently.
48 lines
1.1 KiB
C
48 lines
1.1 KiB
C
/*
|
|
* from: FreeBSD: src/sys/tools/fw_stub.awk,v 1.6 2007/03/02 11:42:53 flz
|
|
*/
|
|
#include <sys/cdefs.h>
|
|
__FBSDID("$FreeBSD$");
|
|
#include <sys/param.h>
|
|
#include <sys/errno.h>
|
|
#include <sys/kernel.h>
|
|
#include <sys/module.h>
|
|
#include <sys/linker.h>
|
|
#include <sys/firmware.h>
|
|
#include <sys/systm.h>
|
|
#include <dev/mxge/rss_eth_z8e.h>
|
|
|
|
static int
|
|
mxge_rss_eth_z8e_fw_modevent(module_t mod, int type, void *unused)
|
|
{
|
|
const struct firmware *fp, *parent;
|
|
int error;
|
|
switch (type) {
|
|
case MOD_LOAD:
|
|
|
|
fp = firmware_register("mxge_rss_eth_z8e", rss_eth_z8e,
|
|
(size_t)rss_eth_z8e_length,
|
|
rss_eth_z8e_uncompressed_length, NULL);
|
|
if (fp == NULL)
|
|
goto fail_0;
|
|
parent = fp;
|
|
return (0);
|
|
fail_0:
|
|
return (ENXIO);
|
|
case MOD_UNLOAD:
|
|
error = firmware_unregister("mxge_rss_eth_z8e");
|
|
return (error);
|
|
}
|
|
return (EINVAL);
|
|
}
|
|
|
|
static moduledata_t mxge_rss_eth_z8e_fw_mod = {
|
|
"mxge_rss_eth_z8e_fw",
|
|
mxge_rss_eth_z8e_fw_modevent,
|
|
0
|
|
};
|
|
DECLARE_MODULE(mxge_rss_eth_z8e_fw, mxge_rss_eth_z8e_fw_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
|
|
MODULE_VERSION(mxge_rss_eth_z8e_fw, 1);
|
|
MODULE_DEPEND(mxge_rss_eth_z8e_fw, firmware, 1, 1, 1);
|
|
|