OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 2 Rev 3
Line 42... Line 42...
42 * @sk_gso_max_segs: Maximum number of GSO segments 42 * @sk_gso_max_segs: Maximum number of GSO segments
43 + * @sk_pacing_shift: scaling factor for TCP Small Queues 43 + * @sk_pacing_shift: scaling factor for TCP Small Queues
44 * @sk_lingertime: %SO_LINGER l_linger setting 44 * @sk_lingertime: %SO_LINGER l_linger setting
45 * @sk_backlog: always used with the per-socket spinlock held 45 * @sk_backlog: always used with the per-socket spinlock held
46 * @sk_callback_lock: used with the callbacks in the end of this struct 46 * @sk_callback_lock: used with the callbacks in the end of this struct
47 @@ -446,6 +447,8 @@ struct sock { 47 @@ -445,6 +446,8 @@ struct sock {
48 sk_type : 16; 48 sk_type : 16;
49 #define SK_PROTOCOL_MAX U8_MAX 49 #define SK_PROTOCOL_MAX U8_MAX
50 u16 sk_gso_max_segs; 50 u16 sk_gso_max_segs;
51 +#define sk_pacing_shift sk_pacing_shift /* for backport checks */ 51 +#define sk_pacing_shift sk_pacing_shift /* for backport checks */
52 + u8 sk_pacing_shift; 52 + u8 sk_pacing_shift;
53 unsigned long sk_lingertime; 53 unsigned long sk_lingertime;
54 struct proto *sk_prot_creator; 54 struct proto *sk_prot_creator;
55 rwlock_t sk_callback_lock; 55 rwlock_t sk_callback_lock;
56 --- a/net/core/sock.c 56 --- a/net/core/sock.c
57 +++ b/net/core/sock.c 57 +++ b/net/core/sock.c
58 @@ -2743,6 +2743,7 @@ void sock_init_data(struct socket *sock, 58 @@ -2739,6 +2739,7 @@ void sock_init_data(struct socket *sock,
Line 59... Line 59...
59 59
60 sk->sk_max_pacing_rate = ~0U; 60 sk->sk_max_pacing_rate = ~0U;
61 sk->sk_pacing_rate = ~0U; 61 sk->sk_pacing_rate = ~0U;
62 + sk->sk_pacing_shift = 10; 62 + sk->sk_pacing_shift = 10;
Line 72... Line 72...
72 - bytes = min(sk->sk_pacing_rate >> 10, 72 - bytes = min(sk->sk_pacing_rate >> 10,
73 + bytes = min(sk->sk_pacing_rate >> sk->sk_pacing_shift, 73 + bytes = min(sk->sk_pacing_rate >> sk->sk_pacing_shift,
74 sk->sk_gso_max_size - 1 - MAX_TCP_HEADER); 74 sk->sk_gso_max_size - 1 - MAX_TCP_HEADER);
Line 75... Line 75...
75 75
76 /* Goal is to send at least one packet per ms, 76 /* Goal is to send at least one packet per ms,
77 @@ -2200,7 +2200,7 @@ static bool tcp_small_queue_check(struct 77 @@ -2184,7 +2184,7 @@ static bool tcp_small_queue_check(struct
78 { 78 {
Line 79... Line 79...
79 unsigned int limit; 79 unsigned int limit;
80 80