aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2023-02-28 20:57:21 +0000
committerMark Johnston <markj@FreeBSD.org>2023-02-28 20:57:21 +0000
commit317fa5169d35c508a05c520a764630252adebea8 (patch)
tree82d3fafd2d53fa814bf327b0e27a3924631843a0
parentd1d0ae97ca8837306b2a791829566787d1ac723f (diff)
downloadsrc-317fa5169d35c508a05c520a764630252adebea8.tar.gz
src-317fa5169d35c508a05c520a764630252adebea8.zip
netinet: Remove the IP(V6)_RSS_LISTEN_BUCKET socket option
It has no effect, and an exp-run revealed that it is not in use. PR: 261398 (exp-run) Reviewed by: mjg, glebius Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D38822
-rw-r--r--sys/netinet/in.h3
-rw-r--r--sys/netinet/in_pcb.c1
-rw-r--r--sys/netinet/in_pcb.h6
-rw-r--r--sys/netinet/ip_output.c14
-rw-r--r--sys/netinet6/in6.h4
-rw-r--r--sys/netinet6/ip6_output.c16
6 files changed, 8 insertions, 36 deletions
diff --git a/sys/netinet/in.h b/sys/netinet/in.h
index 99809b3ebaa4..0106f55e1f1a 100644
--- a/sys/netinet/in.h
+++ b/sys/netinet/in.h
@@ -463,7 +463,8 @@ VNET_DECLARE(uint32_t, in_loopback_mask);
/* unused; was IP_FAITH */
#define IP_ONESBCAST 23 /* bool: send all-ones broadcast */
#define IP_BINDANY 24 /* bool: allow bind to any address */
-#define IP_RSS_LISTEN_BUCKET 26 /* int; set RSS listen bucket */
+ /* unused; was IP_BIND_MULTI */
+ /* unused; was IP_RSS_LISTEN_BUCKET */
#define IP_ORIGDSTADDR 27 /* bool: receive IP dst addr/port w/dgram */
#define IP_RECVORIGDSTADDR IP_ORIGDSTADDR
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index ce95ece8f5f2..5768979f21e0 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -2645,7 +2645,6 @@ in_pcbtoxinpcb(const struct inpcb *inp, struct xinpcb *xi)
xi->inp_flowtype = inp->inp_flowtype;
xi->inp_flags = inp->inp_flags;
xi->inp_flags2 = inp->inp_flags2;
- xi->inp_rss_listen_bucket = inp->inp_rss_listen_bucket;
xi->in6p_cksum = inp->in6p_cksum;
xi->in6p_hops = inp->in6p_hops;
xi->inp_ip_tos = inp->inp_ip_tos;
diff --git a/sys/netinet/in_pcb.h b/sys/netinet/in_pcb.h
index 9ab9ed87528e..f8a2a311cf4e 100644
--- a/sys/netinet/in_pcb.h
+++ b/sys/netinet/in_pcb.h
@@ -263,7 +263,6 @@ struct inpcb {
uint32_t inp_flowid; /* (x) flow id / queue id */
struct m_snd_tag *inp_snd_tag; /* (i) send tag for outgoing mbufs */
uint32_t inp_flowtype; /* (x) M_HASHTYPE value */
- uint32_t inp_rss_listen_bucket; /* (x) overridden RSS listen bucket */
/* Local and foreign ports, local and foreign addr. */
struct in_conninfo inp_inc; /* (i) list for PCB's local port */
@@ -347,7 +346,7 @@ struct xinpcb {
uint32_t inp_flowtype; /* (s) */
int32_t inp_flags; /* (s,p) */
int32_t inp_flags2; /* (s) */
- int32_t inp_rss_listen_bucket; /* (n) */
+ uint32_t inp_unused;
int32_t in6p_cksum; /* (n) */
int32_t inp_spare32[4];
uint16_t in6p_hops; /* (n) */
@@ -669,7 +668,8 @@ int inp_so_options(const struct inpcb *inp);
#define INP_REUSEPORT 0x00000008 /* SO_REUSEPORT option is set */
/* 0x00000010 */
#define INP_REUSEADDR 0x00000020 /* SO_REUSEADDR option is set */
-#define INP_RSS_BUCKET_SET 0x00000080 /* IP_RSS_LISTEN_BUCKET is set */
+/* 0x00000040 */
+/* 0x00000080 */
#define INP_RECVFLOWID 0x00000100 /* populate recv datagram with flow info */
#define INP_RECVRSSBUCKETID 0x00000200 /* populate recv datagram with bucket id */
#define INP_RATE_LIMIT_CHANGED 0x00000400 /* rate limit needs attention */
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 13ba15050769..ceae756affa3 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -1166,9 +1166,6 @@ ip_ctloutput(struct socket *so, struct sockopt *sopt)
break;
}
/* FALLTHROUGH */
-#ifdef RSS
- case IP_RSS_LISTEN_BUCKET:
-#endif
case IP_TOS:
case IP_TTL:
case IP_MINTTL:
@@ -1264,16 +1261,7 @@ ip_ctloutput(struct socket *so, struct sockopt *sopt)
case IP_RECVFLOWID:
OPTSET2(INP_RECVFLOWID, optval);
break;
-#ifdef RSS
- case IP_RSS_LISTEN_BUCKET:
- if ((optval >= 0) &&
- (optval < rss_getnumbuckets())) {
- inp->inp_rss_listen_bucket = optval;
- OPTSET2(INP_RSS_BUCKET_SET, 1);
- } else {
- error = EINVAL;
- }
- break;
+#ifdef RSS
case IP_RECVRSSBUCKETID:
OPTSET2(INP_RECVRSSBUCKETID, optval);
break;
diff --git a/sys/netinet6/in6.h b/sys/netinet6/in6.h
index 23a31010d081..41fe07fe093d 100644
--- a/sys/netinet6/in6.h
+++ b/sys/netinet6/in6.h
@@ -483,8 +483,8 @@ struct route_in6 {
*/
#define IPV6_BINDANY 64 /* bool: allow bind to any address */
-
-#define IPV6_RSS_LISTEN_BUCKET 66 /* int; set RSS listen bucket */
+ /* unused; was IPV6_BIND_MULTI */
+ /* unused; was IPV6_RSS_LISTEN_BUCKET */
#define IPV6_FLOWID 67 /* int; flowid of given socket */
#define IPV6_FLOWTYPE 68 /* int; flowtype of given socket */
#define IPV6_RSSBUCKETID 69 /* int; RSS bucket ID of given socket */
diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c
index 01c6ba5b41d4..59ac04842854 100644
--- a/sys/netinet6/ip6_output.c
+++ b/sys/netinet6/ip6_output.c
@@ -1752,9 +1752,6 @@ ip6_ctloutput(struct socket *so, struct sockopt *sopt)
case IPV6_AUTOFLOWLABEL:
case IPV6_ORIGDSTADDR:
case IPV6_BINDANY:
-#ifdef RSS
- case IPV6_RSS_LISTEN_BUCKET:
-#endif
case IPV6_VLAN_PCP:
if (optname == IPV6_BINDANY && td != NULL) {
error = priv_check(td,
@@ -1932,19 +1929,6 @@ do { \
case IPV6_BINDANY:
OPTSET(INP_BINDANY);
break;
-#ifdef RSS
- case IPV6_RSS_LISTEN_BUCKET:
- if ((optval >= 0) &&
- (optval < rss_getnumbuckets())) {
- INP_WLOCK(inp);
- inp->inp_rss_listen_bucket = optval;
- OPTSET2_N(INP_RSS_BUCKET_SET, 1);
- INP_WUNLOCK(inp);
- } else {
- error = EINVAL;
- }
- break;
-#endif
case IPV6_VLAN_PCP:
if ((optval >= -1) && (optval <=
(INP_2PCP_MASK >> INP_2PCP_SHIFT))) {