1
- From 71415ae851357025a99b8ead7edf5755a55b6fbb Mon Sep 17 00:00:00 2001
2
- From: Pavel Shirshov <pavelsh@microsoft .com>
3
- Date: Mon, 16 Nov 2020 18:00:12 -0800
4
- Subject: [PATCH 1/5 ] Add support of bgp tcp DSCP value
1
+ From 4ab192df23362e64d1a11441fae82329388f103e Mon Sep 17 00:00:00 2001
2
+ From: Syed Hasan Raza Naqvi <syed.naqvi@broadcom .com>
3
+ Date: Thu, 21 Apr 2022 17:01:32 -0700
4
+ Subject: [PATCH] [PATCH 1/8 ] Add support of bgp tcp DSCP value
5
5
6
6
---
7
7
bgpd/bgp_network.c | 11 ++++-------
8
8
bgpd/bgp_vty.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
9
- bgpd/bgpd.c | 2 +-
9
+ bgpd/bgpd.c | 1 +
10
10
bgpd/bgpd.h | 3 +++
11
- 4 files changed, 52 insertions(+), 8 deletions(-)
11
+ 4 files changed, 52 insertions(+), 7 deletions(-)
12
12
13
13
diff --git a/bgpd/bgp_network.c b/bgpd/bgp_network.c
14
- index cae11ae7b..f1d96664d 100644
14
+ index 3fb7619ed..70c771683 100644
15
15
--- a/bgpd/bgp_network.c
16
16
+++ b/bgpd/bgp_network.c
17
- @@ -721 ,11 +721 ,9 @@ int bgp_connect(struct peer *peer)
17
+ @@ -743 ,11 +743 ,9 @@ int bgp_connect(struct peer *peer)
18
18
#ifdef IPTOS_PREC_INTERNETCONTROL
19
19
frr_with_privs(&bgpd_privs) {
20
20
if (sockunion_family(&peer->su) == AF_INET)
@@ -28,7 +28,7 @@ index cae11ae7b..f1d96664d 100644
28
28
}
29
29
#endif
30
30
31
- @@ -801 ,10 +799 ,9 @@ static int bgp_listener(int sock, struct sockaddr *sa, socklen_t salen,
31
+ @@ -824 ,10 +822 ,9 @@ static int bgp_listener(int sock, struct sockaddr *sa, socklen_t salen,
32
32
33
33
#ifdef IPTOS_PREC_INTERNETCONTROL
34
34
if (sa->sa_family == AF_INET)
@@ -42,10 +42,10 @@ index cae11ae7b..f1d96664d 100644
42
42
43
43
sockopt_v6only(sa->sa_family, sock);
44
44
diff --git a/bgpd/bgp_vty.c b/bgpd/bgp_vty.c
45
- index bb2f89f9e..33662b08e 100644
45
+ index 4df2abef8..950d1d25c 100644
46
46
--- a/bgpd/bgp_vty.c
47
47
+++ b/bgpd/bgp_vty.c
48
- @@ -1330 ,6 +1330 ,42 @@ DEFUN (no_router_bgp,
48
+ @@ -1558 ,6 +1558 ,42 @@ DEFUN (no_router_bgp,
49
49
return CMD_SUCCESS;
50
50
}
51
51
@@ -88,7 +88,7 @@ index bb2f89f9e..33662b08e 100644
88
88
89
89
/* BGP router-id. */
90
90
91
- @@ -15549 ,6 +15585 ,10 @@ int bgp_config_write(struct vty *vty)
91
+ @@ -17053 ,6 +17089 ,10 @@ int bgp_config_write(struct vty *vty)
92
92
if (CHECK_FLAG(bgp->flags, BGP_FLAG_NO_FAST_EXT_FAILOVER))
93
93
vty_out(vty, " no bgp fast-external-failover\n");
94
94
@@ -97,9 +97,9 @@ index bb2f89f9e..33662b08e 100644
97
97
+ vty_out(vty, " bgp session-dscp %02X\n", bgp->tcp_dscp >> 2);
98
98
+
99
99
/* BGP router ID. */
100
- if (bgp->router_id_static.s_addr != 0 )
101
- vty_out(vty, " bgp router-id %s \n",
102
- @@ -16057 ,6 +16097 ,10 @@ void bgp_vty_init(void)
100
+ if (bgp->router_id_static.s_addr != INADDR_ANY )
101
+ vty_out(vty, " bgp router-id %pI4 \n",
102
+ @@ -17662 ,6 +17702 ,10 @@ void bgp_vty_init(void)
103
103
/* "no router bgp" commands. */
104
104
install_element(CONFIG_NODE, &no_router_bgp_cmd);
105
105
@@ -111,32 +111,31 @@ index bb2f89f9e..33662b08e 100644
111
111
install_element(BGP_NODE, &bgp_router_id_cmd);
112
112
install_element(BGP_NODE, &no_bgp_router_id_cmd);
113
113
diff --git a/bgpd/bgpd.c b/bgpd/bgpd.c
114
- index cf9ff038d..0e8579843 100644
114
+ index 7e528b219..005523544 100644
115
115
--- a/bgpd/bgpd.c
116
116
+++ b/bgpd/bgpd.c
117
- @@ -3069,7 +3069,7 @@ static struct bgp *bgp_create(as_t *as, const char *name,
118
-
117
+ @@ -3229,6 +3229,7 @@ static struct bgp *bgp_create(as_t *as, const char *name,
119
118
bgp->evpn_info = XCALLOC(MTYPE_BGP_EVPN_INFO,
120
119
sizeof(struct bgp_evpn_info));
121
- -
120
+
122
121
+ bgp->tcp_dscp = IPTOS_PREC_INTERNETCONTROL;
123
122
bgp_evpn_init(bgp);
123
+ bgp_evpn_vrf_es_init(bgp);
124
124
bgp_pbr_init(bgp);
125
-
126
125
diff --git a/bgpd/bgpd.h b/bgpd/bgpd.h
127
- index 2aa069002..914f296e5 100644
126
+ index 8b93c450e..e780d8a03 100644
128
127
--- a/bgpd/bgpd.h
129
128
+++ b/bgpd/bgpd.h
130
- @@ -678 ,6 +678 ,9 @@ struct bgp {
129
+ @@ -743 ,6 +743 ,9 @@ struct bgp {
131
130
/* Weighted ECMP related config. */
132
131
enum bgp_link_bw_handling lb_handling;
133
132
134
133
+ /* dscp value for tcp sessions */
135
134
+ uint8_t tcp_dscp;
136
135
+
137
- QOBJ_FIELDS
138
- } ;
139
- DECLARE_QOBJ_TYPE(bgp)
136
+ /* Process Queue for handling routes */
137
+ struct work_queue *process_queue ;
138
+
140
139
- -
141
- 2.29.2.windows .2
140
+ 2.12 .2
142
141
0 commit comments