summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSoheil Hassas Yeganeh <soheil@google.com>2016-09-19 23:39:08 -0400
committerDavid S. Miller <davem@davemloft.net>2016-09-21 00:22:59 -0400
commitf78e73e27fdeab6f9317667f7e9676b59c1ec1fb (patch)
tree5f8ae6dedbe91b039cb6330db7ada0af22140f24
parent94d308d060cd3ee65152b8ebd7a1c24fa86eee82 (diff)
tcp: cdg: rename struct minmax in tcp_cdg.c to avoid a naming conflict
The upcoming change "lib/win_minmax: windowed min or max estimator" introduces a struct called minmax, which is then included in include/linux/tcp.h in the upcoming change "tcp: use windowed min filter library for TCP min_rtt estimation". This would create a compilation error for tcp_cdg.c, which defines its own minmax struct. To avoid this naming conflict (and potentially others in the future), this commit renames the version used in tcp_cdg.c to cdg_minmax. Signed-off-by: Soheil Hassas Yeganeh <soheil@google.com> Signed-off-by: Neal Cardwell <ncardwell@google.com> Signed-off-by: Yuchung Cheng <ycheng@google.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Kenneth Klette Jonassen <kennetkl@ifi.uio.no> Acked-by: Kenneth Klette Jonassen <kennetkl@ifi.uio.no> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/tcp_cdg.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ipv4/tcp_cdg.c b/net/ipv4/tcp_cdg.c
index 03725b294286..35b280361cb2 100644
--- a/net/ipv4/tcp_cdg.c
+++ b/net/ipv4/tcp_cdg.c
@@ -56,7 +56,7 @@ MODULE_PARM_DESC(use_shadow, "use shadow window heuristic");
56module_param(use_tolerance, bool, 0644); 56module_param(use_tolerance, bool, 0644);
57MODULE_PARM_DESC(use_tolerance, "use loss tolerance heuristic"); 57MODULE_PARM_DESC(use_tolerance, "use loss tolerance heuristic");
58 58
59struct minmax { 59struct cdg_minmax {
60 union { 60 union {
61 struct { 61 struct {
62 s32 min; 62 s32 min;
@@ -74,10 +74,10 @@ enum cdg_state {
74}; 74};
75 75
76struct cdg { 76struct cdg {
77 struct minmax rtt; 77 struct cdg_minmax rtt;
78 struct minmax rtt_prev; 78 struct cdg_minmax rtt_prev;
79 struct minmax *gradients; 79 struct cdg_minmax *gradients;
80 struct minmax gsum; 80 struct cdg_minmax gsum;
81 bool gfilled; 81 bool gfilled;
82 u8 tail; 82 u8 tail;
83 u8 state; 83 u8 state;
@@ -353,7 +353,7 @@ static void tcp_cdg_cwnd_event(struct sock *sk, const enum tcp_ca_event ev)
353{ 353{
354 struct cdg *ca = inet_csk_ca(sk); 354 struct cdg *ca = inet_csk_ca(sk);
355 struct tcp_sock *tp = tcp_sk(sk); 355 struct tcp_sock *tp = tcp_sk(sk);
356 struct minmax *gradients; 356 struct cdg_minmax *gradients;
357 357
358 switch (ev) { 358 switch (ev) {
359 case CA_EVENT_CWND_RESTART: 359 case CA_EVENT_CWND_RESTART: