Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f78e73e2 authored by Soheil Hassas Yeganeh's avatar Soheil Hassas Yeganeh Committed by David S. Miller
Browse files

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: default avatarSoheil Hassas Yeganeh <soheil@google.com>
Signed-off-by: default avatarNeal Cardwell <ncardwell@google.com>
Signed-off-by: default avatarYuchung Cheng <ycheng@google.com>
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Cc: Kenneth Klette Jonassen <kennetkl@ifi.uio.no>
Acked-by: default avatarKenneth Klette Jonassen <kennetkl@ifi.uio.no>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 94d308d0
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -56,7 +56,7 @@ MODULE_PARM_DESC(use_shadow, "use shadow window heuristic");
module_param(use_tolerance, bool, 0644);
module_param(use_tolerance, bool, 0644);
MODULE_PARM_DESC(use_tolerance, "use loss tolerance heuristic");
MODULE_PARM_DESC(use_tolerance, "use loss tolerance heuristic");


struct minmax {
struct cdg_minmax {
	union {
	union {
		struct {
		struct {
			s32 min;
			s32 min;
@@ -74,10 +74,10 @@ enum cdg_state {
};
};


struct cdg {
struct cdg {
	struct minmax rtt;
	struct cdg_minmax rtt;
	struct minmax rtt_prev;
	struct cdg_minmax rtt_prev;
	struct minmax *gradients;
	struct cdg_minmax *gradients;
	struct minmax gsum;
	struct cdg_minmax gsum;
	bool gfilled;
	bool gfilled;
	u8  tail;
	u8  tail;
	u8  state;
	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 cdg *ca = inet_csk_ca(sk);
	struct tcp_sock *tp = tcp_sk(sk);
	struct tcp_sock *tp = tcp_sk(sk);
	struct minmax *gradients;
	struct cdg_minmax *gradients;


	switch (ev) {
	switch (ev) {
	case CA_EVENT_CWND_RESTART:
	case CA_EVENT_CWND_RESTART: