Author: adrian
Date: Wed Feb 25 21:44:53 2015
New Revision: 279299
URL: https://svnweb.freebsd.org/changeset/base/279299

Log:
  Migrate using CPU_ZERO() + CPU_SET() -> CPU_SETOF().
  
  Tested:
  
  * ixgbe, igb, RSS enabled
  
  Submitted by: jhb
  Sponsored by: Norse Corp, Inc.

Modified:
  head/sys/dev/e1000/if_igb.c
  head/sys/dev/ixgbe/ixgbe.c
  head/sys/dev/ixl/if_ixl.c
  head/sys/dev/ixl/if_ixlv.c

Modified: head/sys/dev/e1000/if_igb.c
==============================================================================
--- head/sys/dev/e1000/if_igb.c Wed Feb 25 21:43:09 2015        (r279298)
+++ head/sys/dev/e1000/if_igb.c Wed Feb 25 21:44:53 2015        (r279299)
@@ -2569,8 +2569,7 @@ igb_allocate_msix(struct adapter *adapte
                         * round-robin bucket -> queue -> CPU allocation.
                         */
 #ifdef RSS
-                       CPU_ZERO(&cpu_mask);
-                       CPU_SET(cpu_id, &cpu_mask);
+                       CPU_SETOF(cpu_id, &cpu_mask);
                        taskqueue_start_threads_cpuset(&que->tq, 1, PI_NET,
                            &cpu_mask,
                            "%s que (bucket %d)",

Modified: head/sys/dev/ixgbe/ixgbe.c
==============================================================================
--- head/sys/dev/ixgbe/ixgbe.c  Wed Feb 25 21:43:09 2015        (r279298)
+++ head/sys/dev/ixgbe/ixgbe.c  Wed Feb 25 21:44:53 2015        (r279299)
@@ -2463,8 +2463,7 @@ ixgbe_allocate_msix(struct adapter *adap
                que->tq = taskqueue_create_fast("ixgbe_que", M_NOWAIT,
                    taskqueue_thread_enqueue, &que->tq);
 #ifdef RSS
-               CPU_ZERO(&cpu_mask);
-               CPU_SET(cpu_id, &cpu_mask);
+               CPU_SETOF(cpu_id, &cpu_mask);
                taskqueue_start_threads_cpuset(&que->tq, 1, PI_NET,
                    &cpu_mask,
                    "%s (bucket %d)",

Modified: head/sys/dev/ixl/if_ixl.c
==============================================================================
--- head/sys/dev/ixl/if_ixl.c   Wed Feb 25 21:43:09 2015        (r279298)
+++ head/sys/dev/ixl/if_ixl.c   Wed Feb 25 21:44:53 2015        (r279299)
@@ -1945,8 +1945,7 @@ ixl_assign_vsi_msix(struct ixl_pf *pf)
                que->tq = taskqueue_create_fast("ixl_que", M_NOWAIT,
                    taskqueue_thread_enqueue, &que->tq);
 #ifdef RSS
-               CPU_ZERO(&cpu_mask);
-               CPU_SET(cpu_id, &cpu_mask);
+               CPU_SETOF(cpu_id, &cpu_mask);
                taskqueue_start_threads_cpuset(&que->tq, 1, PI_NET,
                    &cpu_mask, "%s (bucket %d)",
                    device_get_nameunit(dev), cpu_id);

Modified: head/sys/dev/ixl/if_ixlv.c
==============================================================================
--- head/sys/dev/ixl/if_ixlv.c  Wed Feb 25 21:43:09 2015        (r279298)
+++ head/sys/dev/ixl/if_ixlv.c  Wed Feb 25 21:44:53 2015        (r279299)
@@ -1419,8 +1419,7 @@ ixlv_assign_msix(struct ixlv_sc *sc)
                que->tq = taskqueue_create_fast("ixlv_que", M_NOWAIT,
                    taskqueue_thread_enqueue, &que->tq);
 #ifdef RSS
-               CPU_ZERO(&cpu_mask);
-               CPU_SET(cpu_id, &cpu_mask);
+               CPU_SETOF(cpu_id, &cpu_mask);
                taskqueue_start_threads_cpuset(&que->tq, 1, PI_NET,
                    &cpu_mask, "%s (bucket %d)",
                    device_get_nameunit(dev), cpu_id);
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to