From f22bfc72f8a9f25c14a51b540c2122e7f8c21d90 Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Thu, 23 Jun 2016 21:07:15 +0000 Subject: [PATCH] Add spares to struct ifnet and socket for packet pacing and/or general use. Update comments regarding the spare fields in struct inpcb. Bump __FreeBSD_version for the changes to the size of the structures. Reviewed by: gnn@ Approved by: re@ (gjb@) Sponsored by: Chelsio Communications --- sys/net/if_var.h | 2 ++ sys/netinet/in_pcb.h | 4 ++-- sys/sys/param.h | 2 +- sys/sys/socketvar.h | 3 +++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/sys/net/if_var.h b/sys/net/if_var.h index f0766ee70721..2298de5a2816 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -311,6 +311,8 @@ struct ifnet { * that structure can be enhanced without changing the kernel * binary interface. */ + void *if_pspare[4]; /* packet pacing / general use */ + int if_ispare[4]; /* packet pacing / general use */ }; /* for compatibility with other BSDs */ diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h index 17f7c3dc24ce..4e3fbe5595bf 100644 --- a/sys/netinet/in_pcb.h +++ b/sys/netinet/in_pcb.h @@ -202,10 +202,10 @@ struct inpcb { u_char inp_ip_minttl; /* (i) minimum TTL or drop */ uint32_t inp_flowid; /* (x) flow id / queue id */ u_int inp_refcount; /* (i) refcount */ - void *inp_pspare[5]; /* (x) route caching / general use */ + void *inp_pspare[5]; /* (x) packet pacing / general use */ uint32_t inp_flowtype; /* (x) M_HASHTYPE value */ uint32_t inp_rss_listen_bucket; /* (x) overridden RSS listen bucket */ - u_int inp_ispare[4]; /* (x) route caching / user cookie / + u_int inp_ispare[4]; /* (x) packet pacing / user cookie / * general use */ /* Local and foreign ports, local and foreign addr. */ diff --git a/sys/sys/param.h b/sys/sys/param.h index e254573a606d..5da801639b3f 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100119 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100120 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index 87b8a2a57d76..3bc2bae2be69 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -126,6 +126,9 @@ struct socket { */ int so_fibnum; /* routing domain for this socket */ uint32_t so_user_cookie; + + void *so_pspare[2]; /* packet pacing / general use */ + int so_ispare[2]; /* packet pacing / general use */ }; /*