svn commit: r280204 - head/sys/dev/ixgbe
Adrian Chadd
adrian at FreeBSD.org
Wed Mar 18 05:05:32 UTC 2015
Author: adrian
Date: Wed Mar 18 05:05:30 2015
New Revision: 280204
URL: https://svnweb.freebsd.org/changeset/base/280204
Log:
Fix ixgbe(4) to compile - with RSS; with ix+ixv in the kernel.
* Fix the multiple same-named devclasses; the duplicate name
trips up the linker.
* Re-do the taskqueue stuff to use the new cpuset API, not the old
pinned API.
* Add includes for the new location of the RSS configuration routines.
This allows ixgbe to compile as a module /and/ linked into the kernel,
along with RSS working.
Sponsored by: Norse Corp, Inc.
Modified:
head/sys/dev/ixgbe/if_ix.c
head/sys/dev/ixgbe/if_ixv.c
head/sys/dev/ixgbe/ix_txrx.c
Modified: head/sys/dev/ixgbe/if_ix.c
==============================================================================
--- head/sys/dev/ixgbe/if_ix.c Wed Mar 18 05:03:07 2015 (r280203)
+++ head/sys/dev/ixgbe/if_ix.c Wed Mar 18 05:05:30 2015 (r280204)
@@ -42,6 +42,7 @@
#include "ixgbe.h"
#ifdef RSS
+#include <net/rss_config.h>
#include <netinet/in_rss.h>
#endif
@@ -191,7 +192,7 @@ extern void ixgbe_stop_mac_link_on_d3_82
* FreeBSD Device Interface Entry Points
*********************************************************************/
-static device_method_t ixgbe_methods[] = {
+static device_method_t ix_methods[] = {
/* Device interface */
DEVMETHOD(device_probe, ixgbe_probe),
DEVMETHOD(device_attach, ixgbe_attach),
@@ -200,15 +201,15 @@ static device_method_t ixgbe_methods[] =
DEVMETHOD_END
};
-static driver_t ixgbe_driver = {
- "ix", ixgbe_methods, sizeof(struct adapter),
+static driver_t ix_driver = {
+ "ix", ix_methods, sizeof(struct adapter),
};
-devclass_t ixgbe_devclass;
-DRIVER_MODULE(ixgbe, pci, ixgbe_driver, ixgbe_devclass, 0, 0);
+devclass_t ix_devclass;
+DRIVER_MODULE(ix, pci, ix_driver, ix_devclass, 0, 0);
-MODULE_DEPEND(ixgbe, pci, 1, 1, 1);
-MODULE_DEPEND(ixgbe, ether, 1, 1, 1);
+MODULE_DEPEND(ix, pci, 1, 1, 1);
+MODULE_DEPEND(ix, ether, 1, 1, 1);
/*
** TUNEABLE PARAMETERS:
@@ -2110,6 +2111,9 @@ ixgbe_allocate_msix(struct adapter *adap
struct tx_ring *txr = adapter->tx_rings;
int error, rid, vector = 0;
int cpu_id = 0;
+#ifdef RSS
+ cpuset_t cpu_mask;
+#endif
#ifdef RSS
/*
@@ -2199,8 +2203,9 @@ ixgbe_allocate_msix(struct adapter *adap
que->tq = taskqueue_create_fast("ixgbe_que", M_NOWAIT,
taskqueue_thread_enqueue, &que->tq);
#ifdef RSS
- taskqueue_start_threads_pinned(&que->tq, 1, PI_NET,
- cpu_id,
+ CPU_SETOF(cpu_id, &cpu_mask);
+ taskqueue_start_threads_cpuset(&que->tq, 1, PI_NET,
+ &cpu_mask,
"%s (bucket %d)",
device_get_nameunit(adapter->dev),
cpu_id);
Modified: head/sys/dev/ixgbe/if_ixv.c
==============================================================================
--- head/sys/dev/ixgbe/if_ixv.c Wed Mar 18 05:03:07 2015 (r280203)
+++ head/sys/dev/ixgbe/if_ixv.c Wed Mar 18 05:05:30 2015 (r280204)
@@ -142,10 +142,11 @@ static driver_t ixv_driver = {
"ixv", ixv_methods, sizeof(struct adapter),
};
-devclass_t ixgbe_devclass;
-DRIVER_MODULE(ixv, pci, ixv_driver, ixgbe_devclass, 0, 0);
+devclass_t ixv_devclass;
+DRIVER_MODULE(ixv, pci, ixv_driver, ixv_devclass, 0, 0);
MODULE_DEPEND(ixv, pci, 1, 1, 1);
MODULE_DEPEND(ixv, ether, 1, 1, 1);
+/* XXX depend on 'ix' ? */
/*
** TUNEABLE PARAMETERS:
Modified: head/sys/dev/ixgbe/ix_txrx.c
==============================================================================
--- head/sys/dev/ixgbe/ix_txrx.c Wed Mar 18 05:03:07 2015 (r280203)
+++ head/sys/dev/ixgbe/ix_txrx.c Wed Mar 18 05:05:30 2015 (r280204)
@@ -42,6 +42,7 @@
#include "ixgbe.h"
#ifdef RSS
+#include <net/rss_config.h>
#include <netinet/in_rss.h>
#endif
More information about the svn-src-all
mailing list