summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_io.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@nvidia.com>2022-10-24 23:35:04 +0200
committerStephen Worley <sworley@nvidia.com>2022-10-25 00:25:56 +0200
commit847ee2bb2edf77e1376056a8f4c46e3c4f83b260 (patch)
treee47eafddf43f298c929e5e3f8f567297f0d219ae /bgpd/bgp_io.c
parentbgpd,doc: limit InQ buf to allow for back pressure (diff)
downloadfrr-847ee2bb2edf77e1376056a8f4c46e3c4f83b260.tar.xz
frr-847ee2bb2edf77e1376056a8f4c46e3c4f83b260.zip
bgpd: checkpatch fixes in bgp_io code
Some checkpatch fixes for comments in the bgp_io code. Signed-off-by: Stephen Worley <sworley@nvidia.com>
Diffstat (limited to 'bgpd/bgp_io.c')
-rw-r--r--bgpd/bgp_io.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/bgpd/bgp_io.c b/bgpd/bgp_io.c
index 4928e10b3..c8338d3d5 100644
--- a/bgpd/bgp_io.c
+++ b/bgpd/bgp_io.c
@@ -50,9 +50,9 @@ static void bgp_process_reads(struct thread *);
static bool validate_header(struct peer *);
/* generic i/o status codes */
-#define BGP_IO_TRANS_ERR (1 << 0) // EAGAIN or similar occurred
-#define BGP_IO_FATAL_ERR (1 << 1) // some kind of fatal TCP error
-#define BGP_IO_WORK_FULL_ERR (1 << 2) // No room in work buffer
+#define BGP_IO_TRANS_ERR (1 << 0) /* EAGAIN or similar occurred */
+#define BGP_IO_FATAL_ERR (1 << 1) /* some kind of fatal TCP error */
+#define BGP_IO_WORK_FULL_ERR (1 << 2) /* No room in work buffer */
/* Thread external API ----------------------------------------------------- */
@@ -226,13 +226,13 @@ static int read_ibuf_work(struct peer *peer)
static void bgp_process_reads(struct thread *thread)
{
/* clang-format off */
- static struct peer *peer; // peer to read from
- uint16_t status; // bgp_read status code
- bool fatal = false; // whether fatal error occurred
- bool added_pkt = false; // whether we pushed onto ->ibuf
- int code = 0; // FSM code if error occurred
- bool ibuf_full = false; // Is peer fifo IN Buffer full
- static bool ibuf_full_logged; // Have we logged full already
+ static struct peer *peer; /* peer to read from */
+ uint16_t status; /* bgp_read status code */
+ bool fatal = false; /* whether fatal error occurred */
+ bool added_pkt = false; /* whether we pushed onto ->ibuf */
+ int code = 0; /* FSM code if error occurred */
+ bool ibuf_full = false; /* Is peer fifo IN Buffer full */
+ static bool ibuf_full_logged; /* Have we logged full already */
int ret = 1;
/* clang-format on */
@@ -502,9 +502,9 @@ done : {
*/
static uint16_t bgp_read(struct peer *peer, int *code_p)
{
- size_t readsize; // how many bytes we want to read
- ssize_t nbytes; // how many bytes we actually read
- size_t ibuf_work_space; // how much space we can read into the work buf
+ size_t readsize; /* how many bytes we want to read */
+ ssize_t nbytes; /* how many bytes we actually read */
+ size_t ibuf_work_space; /* space we can read into the work buf */
uint16_t status = 0;
ibuf_work_space = ringbuf_space(peer->ibuf_work);