Thread (56 messages) 56 messages, 9 authors, 2016-03-25

Re: [PATCH 1/1] net: Add SO_REUSEPORT_LISTEN_OFF socket option as drain mode

From: Tolga Ceylan <hidden>
Date: 2015-09-27 02:02:14

On Sat, Sep 26, 2015 at 6:44 PM, Aaron Conole [off-list ref] wrote:
Greetings.

Tolga Ceylan [off-list ref] writes:
quoted
+#define SO_REUSEPORT_LISTEN_OFF 51
+
For all of these, I think the space should be tab.
quoted
      unsigned char           skc_reuseport:1;
+      unsigned char       skc_reuseport_listen_off:1;
      unsigned char           skc_ipv6only:1;
The spacing here is wrong.
quoted
@@ -224,10 +224,13 @@ begin:
                              phash = inet_ehashfn(net, daddr, hnum,
                                                   saddr, sport);
                              matches = 1;
+                             if (sk->sk_reuseport_listen_off)
+                                     result = NULL;
I am concerned here. I think you need to reset hiscore and matches as
well, not just result.
By keeping hiscore/matches as is, I'm trying to keep the hashing consistent.
Otherwise, this would behave similar to removing a listener which
drops connections.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help