OSDN Git Service

tcp: cdg: rename struct minmax in tcp_cdg.c to avoid a naming conflict
authorSoheil Hassas Yeganeh <soheil@google.com>
Tue, 20 Sep 2016 03:39:08 +0000 (23:39 -0400)
committerDavid S. Miller <davem@davemloft.net>
Wed, 21 Sep 2016 04:22:59 +0000 (00:22 -0400)
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>
net/ipv4/tcp_cdg.c

index 03725b2..35b2803 100644 (file)
@@ -56,7 +56,7 @@ MODULE_PARM_DESC(use_shadow, "use shadow window heuristic");
 module_param(use_tolerance, bool, 0644);
 MODULE_PARM_DESC(use_tolerance, "use loss tolerance heuristic");
 
-struct minmax {
+struct cdg_minmax {
        union {
                struct {
                        s32 min;
@@ -74,10 +74,10 @@ enum cdg_state {
 };
 
 struct cdg {
-       struct minmax rtt;
-       struct minmax rtt_prev;
-       struct minmax *gradients;
-       struct minmax gsum;
+       struct cdg_minmax rtt;
+       struct cdg_minmax rtt_prev;
+       struct cdg_minmax *gradients;
+       struct cdg_minmax gsum;
        bool gfilled;
        u8  tail;
        u8  state;
@@ -353,7 +353,7 @@ static void tcp_cdg_cwnd_event(struct sock *sk, const enum tcp_ca_event ev)
 {
        struct cdg *ca = inet_csk_ca(sk);
        struct tcp_sock *tp = tcp_sk(sk);
-       struct minmax *gradients;
+       struct cdg_minmax *gradients;
 
        switch (ev) {
        case CA_EVENT_CWND_RESTART: