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
This commit is contained in:
Mark Johnston 2023-02-28 15:57:21 -05:00
parent d1d0ae97ca
commit 317fa5169d
6 changed files with 8 additions and 36 deletions

View file

@ -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

View file

@ -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;

View file

@ -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 */

View file

@ -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;

View file

@ -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 */

View file

@ -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))) {