Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F178172459
D62260.1796183587.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
D62260.1796183587.diff
View Options
diff --git a/share/man/man9/netisr.9 b/share/man/man9/netisr.9
--- a/share/man/man9/netisr.9
+++ b/share/man/man9/netisr.9
@@ -25,7 +25,7 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
.\" DAMAGE.
.\"
-.Dd April 12, 2023
+.Dd August 8, 2026
.Dt NETISR 9
.Os
.Sh NAME
@@ -53,12 +53,6 @@
.Fn netisr_getqlimit "const struct netisr_handler *nhp" "u_int *qlimitp"
.Ft int
.Fn netisr_setqlimit "const struct netisr_handler *nhp" "u_int qlimit"
-.Ft u_int
-.Fn netisr_default_flow2cpu "u_int flowid"
-.Ft u_int
-.Fn netisr_get_cpucount "void"
-.Ft u_int
-.Fn netisr_get_cpuid "u_int cpunumber"
.Pp
With optional virtual network stack support enabled via the following kernel
compile option:
diff --git a/sys/net/netisr.h b/sys/net/netisr.h
--- a/sys/net/netisr.h
+++ b/sys/net/netisr.h
@@ -227,19 +227,6 @@
int netisr_queue(u_int proto, struct mbuf *m);
int netisr_queue_src(u_int proto, uintptr_t source, struct mbuf *m);
-/*
- * Provide a default implementation of "map an ID to a CPU ID".
- */
-u_int netisr_default_flow2cpu(u_int flowid);
-
-/*
- * Utility routines to return the number of CPUs participting in netisr, and
- * to return a mapping from a number to a CPU ID that can be used with the
- * scheduler.
- */
-u_int netisr_get_cpucount(void);
-u_int netisr_get_cpuid(u_int cpunumber);
-
/*
* Interfaces between DEVICE_POLLING and netisr.
*/
diff --git a/sys/net/netisr.c b/sys/net/netisr.c
--- a/sys/net/netisr.c
+++ b/sys/net/netisr.c
@@ -318,37 +318,6 @@
#define NWS_UNLOCK(s) mtx_unlock(&(s)->nws_mtx)
#define NWS_SIGNAL(s) swi_sched((s)->nws_swi_cookie, 0)
-/*
- * Utility routines for protocols that implement their own mapping of flows
- * to CPUs.
- */
-u_int
-netisr_get_cpucount(void)
-{
-
- return (nws_count);
-}
-
-u_int
-netisr_get_cpuid(u_int cpunumber)
-{
-
- return (nws_array[cpunumber % nws_count]);
-}
-
-/*
- * The default implementation of flow -> CPU ID mapping.
- *
- * Non-static so that protocols can use it to map their own work to specific
- * CPUs in a manner consistent to netisr for affinity purposes.
- */
-u_int
-netisr_default_flow2cpu(u_int flowid)
-{
-
- return (nws_array[flowid % nws_count]);
-}
-
/*
* Dispatch tunable and sysctl configuration.
*/
@@ -880,11 +849,11 @@
* policy.
*/
if (*cpuidp != NETISR_CPUID_NONE) {
- *cpuidp = netisr_get_cpuid(*cpuidp);
+ *cpuidp = nws_array[*cpuidp % nws_count];
return (m);
}
if (dispatch_policy == NETISR_DISPATCH_HYBRID) {
- *cpuidp = netisr_get_cpuid(curcpu);
+ *cpuidp = nws_array[curcpu % nws_count];
return (m);
}
policy = NETISR_POLICY_SOURCE;
@@ -898,8 +867,7 @@
return (NULL);
}
if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) {
- *cpuidp =
- netisr_default_flow2cpu(m->m_pkthdr.flowid);
+ *cpuidp = nws_array[m->m_pkthdr.flowid % nws_count];
return (m);
}
policy = NETISR_POLICY_SOURCE;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 2, 3:53 AM (23 h, 46 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
42136016
Default Alt Text
D62260.1796183587.diff (2 KB)
Attached To
Mode
D62260: netisr: remove several KPIs that were never used
Attached
Detach File
Event Timeline