mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-14 16:29:32 +00:00
Minor adjustments to address CI warnings
This commit is contained in:
parent
e5b0aaf16b
commit
89cdc4df6c
@ -81,7 +81,8 @@ struct neighbor_entry {
|
|||||||
static struct neighbor_entry *neighbor_entry_new(const uint8_t *id,
|
static struct neighbor_entry *neighbor_entry_new(const uint8_t *id,
|
||||||
struct isis_adjacency *adj)
|
struct isis_adjacency *adj)
|
||||||
{
|
{
|
||||||
struct neighbor_entry *rv = XMALLOC(MTYPE_FABRICD_NEIGHBOR, sizeof(*rv));
|
struct neighbor_entry *rv = XMALLOC(MTYPE_FABRICD_NEIGHBOR,
|
||||||
|
sizeof(*rv));
|
||||||
|
|
||||||
memcpy(rv->id, id, sizeof(rv->id));
|
memcpy(rv->id, id, sizeof(rv->id));
|
||||||
rv->adj = adj;
|
rv->adj = adj;
|
||||||
@ -131,7 +132,7 @@ static int neighbor_entry_list_cmp(void *a, void *b)
|
|||||||
static struct neighbor_entry *neighbor_entry_lookup_list(struct skiplist *list,
|
static struct neighbor_entry *neighbor_entry_lookup_list(struct skiplist *list,
|
||||||
const uint8_t *id)
|
const uint8_t *id)
|
||||||
{
|
{
|
||||||
struct neighbor_entry n = {{0}};
|
struct neighbor_entry n = { {0} };
|
||||||
|
|
||||||
memcpy(n.id, id, sizeof(n.id));
|
memcpy(n.id, id, sizeof(n.id));
|
||||||
|
|
||||||
@ -551,7 +552,8 @@ static void move_to_queue(struct isis_lsp *lsp, struct neighbor_entry *n,
|
|||||||
if (n->adj)
|
if (n->adj)
|
||||||
isis_tx_queue_add(n->adj->circuit->tx_queue, lsp, type);
|
isis_tx_queue_add(n->adj->circuit->tx_queue, lsp, type);
|
||||||
|
|
||||||
uint8_t *neighbor_id = XMALLOC(MTYPE_FABRICD_FLOODING_INFO, sizeof(n->id));
|
uint8_t *neighbor_id = XMALLOC(MTYPE_FABRICD_FLOODING_INFO,
|
||||||
|
sizeof(n->id));
|
||||||
|
|
||||||
memcpy(neighbor_id, n->id, sizeof(n->id));
|
memcpy(neighbor_id, n->id, sizeof(n->id));
|
||||||
listnode_add(lsp->flooding_neighbors[type], neighbor_id);
|
listnode_add(lsp->flooding_neighbors[type], neighbor_id);
|
||||||
@ -624,7 +626,8 @@ static void fabricd_lsp_reset_flooding_info(struct isis_lsp *lsp,
|
|||||||
}
|
}
|
||||||
|
|
||||||
lsp->flooding_neighbors[type] = list_new();
|
lsp->flooding_neighbors[type] = list_new();
|
||||||
lsp->flooding_neighbors[type]->del = fabricd_free_lsp_flooding_info;
|
lsp->flooding_neighbors[type]->del =
|
||||||
|
fabricd_free_lsp_flooding_info;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (circuit) {
|
if (circuit) {
|
||||||
@ -646,16 +649,16 @@ void fabricd_lsp_flood(struct isis_lsp *lsp, struct isis_circuit *circuit)
|
|||||||
struct neighbor_entry *n;
|
struct neighbor_entry *n;
|
||||||
|
|
||||||
/* Mark all elements in NL as present */
|
/* Mark all elements in NL as present */
|
||||||
while (!skiplist_next(f->neighbors, NULL, (void **)&n, &cursor)) {
|
while (!skiplist_next(f->neighbors, NULL, (void **)&n, &cursor))
|
||||||
n->present = true;
|
n->present = true;
|
||||||
}
|
|
||||||
|
|
||||||
/* Mark all elements in NN as present */
|
/* Mark all elements in NN as present */
|
||||||
hash_iterate(f->neighbors_neighbors, mark_neighbor_as_present, NULL);
|
hash_iterate(f->neighbors_neighbors, mark_neighbor_as_present, NULL);
|
||||||
|
|
||||||
struct isis_vertex *originator = isis_find_vertex(&f->spftree->paths,
|
struct isis_vertex *originator =
|
||||||
lsp->hdr.lsp_id,
|
isis_find_vertex(&f->spftree->paths,
|
||||||
VTYPE_NONPSEUDO_TE_IS);
|
lsp->hdr.lsp_id,
|
||||||
|
VTYPE_NONPSEUDO_TE_IS);
|
||||||
|
|
||||||
/* Remove all IS from NL and NN in the shortest path
|
/* Remove all IS from NL and NN in the shortest path
|
||||||
* to the IS that originated the LSP */
|
* to the IS that originated the LSP */
|
||||||
|
@ -708,11 +708,10 @@ static void lsp_flood_or_update(struct isis_lsp *lsp,
|
|||||||
struct isis_circuit *circuit,
|
struct isis_circuit *circuit,
|
||||||
bool circuit_scoped)
|
bool circuit_scoped)
|
||||||
{
|
{
|
||||||
if (!circuit_scoped) {
|
if (!circuit_scoped)
|
||||||
lsp_flood(lsp, circuit);
|
lsp_flood(lsp, circuit);
|
||||||
} else {
|
else
|
||||||
fabricd_update_lsp_no_flood(lsp, circuit);
|
fabricd_update_lsp_no_flood(lsp, circuit);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -990,7 +989,8 @@ dontcheckadj:
|
|||||||
/* our own LSP -> 7.3.16.4 c) */
|
/* our own LSP -> 7.3.16.4 c) */
|
||||||
if (comp == LSP_NEWER) {
|
if (comp == LSP_NEWER) {
|
||||||
lsp_inc_seqno(lsp, hdr.seqno);
|
lsp_inc_seqno(lsp, hdr.seqno);
|
||||||
lsp_flood_or_update(lsp, NULL, circuit_scoped);
|
lsp_flood_or_update(lsp, NULL,
|
||||||
|
circuit_scoped);
|
||||||
} else {
|
} else {
|
||||||
isis_tx_queue_add(circuit->tx_queue,
|
isis_tx_queue_add(circuit->tx_queue,
|
||||||
lsp, TX_LSP_NORMAL);
|
lsp, TX_LSP_NORMAL);
|
||||||
@ -998,7 +998,9 @@ dontcheckadj:
|
|||||||
}
|
}
|
||||||
if (isis->debugs & DEBUG_UPDATE_PACKETS)
|
if (isis->debugs & DEBUG_UPDATE_PACKETS)
|
||||||
zlog_debug(
|
zlog_debug(
|
||||||
"ISIS-Upd (%s): (1) re-originating LSP %s new seq 0x%08" PRIx32,
|
"ISIS-Upd (%s): (1) "
|
||||||
|
"re-originating LSP %s new seq "
|
||||||
|
"0x%08" PRIx32,
|
||||||
circuit->area->area_tag,
|
circuit->area->area_tag,
|
||||||
rawlspid_print(hdr.lsp_id),
|
rawlspid_print(hdr.lsp_id),
|
||||||
lsp->hdr.seqno);
|
lsp->hdr.seqno);
|
||||||
@ -1746,7 +1748,8 @@ int send_hello(struct isis_circuit *circuit, int level)
|
|||||||
|
|
||||||
isis_free_tlvs(tlvs);
|
isis_free_tlvs(tlvs);
|
||||||
|
|
||||||
pdu_counter_count(circuit->area->pdu_tx_counters, hello_pdu_type(circuit, level));
|
pdu_counter_count(circuit->area->pdu_tx_counters,
|
||||||
|
hello_pdu_type(circuit, level));
|
||||||
retval = circuit->tx(circuit, level);
|
retval = circuit->tx(circuit, level);
|
||||||
if (retval != ISIS_OK)
|
if (retval != ISIS_OK)
|
||||||
flog_err(EC_ISIS_PACKET,
|
flog_err(EC_ISIS_PACKET,
|
||||||
@ -1760,9 +1763,8 @@ int send_hello(struct isis_circuit *circuit, int level)
|
|||||||
static int send_hello_cb(struct thread *thread)
|
static int send_hello_cb(struct thread *thread)
|
||||||
{
|
{
|
||||||
struct isis_circuit_arg *arg = THREAD_ARG(thread);
|
struct isis_circuit_arg *arg = THREAD_ARG(thread);
|
||||||
|
|
||||||
assert(arg);
|
assert(arg);
|
||||||
|
|
||||||
struct isis_circuit *circuit = arg->circuit;
|
struct isis_circuit *circuit = arg->circuit;
|
||||||
int level = arg->level;
|
int level = arg->level;
|
||||||
|
|
||||||
@ -2248,7 +2250,8 @@ void send_lsp(struct isis_circuit *circuit, struct isis_lsp *lsp,
|
|||||||
|
|
||||||
if (tx_type == TX_LSP_CIRCUIT_SCOPED) {
|
if (tx_type == TX_LSP_CIRCUIT_SCOPED) {
|
||||||
stream_putc_at(circuit->snd_stream, 4, FS_LINK_STATE);
|
stream_putc_at(circuit->snd_stream, 4, FS_LINK_STATE);
|
||||||
stream_putc_at(circuit->snd_stream, 7, L2_CIRCUIT_FLOODING_SCOPE);
|
stream_putc_at(circuit->snd_stream, 7,
|
||||||
|
L2_CIRCUIT_FLOODING_SCOPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isis->debugs & DEBUG_UPDATE_PACKETS) {
|
if (isis->debugs & DEBUG_UPDATE_PACKETS) {
|
||||||
|
@ -56,7 +56,7 @@ static int pdu_type_to_counter_index(uint8_t pdu_type)
|
|||||||
|
|
||||||
static const char *pdu_counter_index_to_name(enum pdu_counter_index index)
|
static const char *pdu_counter_index_to_name(enum pdu_counter_index index)
|
||||||
{
|
{
|
||||||
switch(index) {
|
switch (index) {
|
||||||
case L1_LAN_HELLO_INDEX:
|
case L1_LAN_HELLO_INDEX:
|
||||||
return " L1 IIH";
|
return " L1 IIH";
|
||||||
case L2_LAN_HELLO_INDEX:
|
case L2_LAN_HELLO_INDEX:
|
||||||
|
@ -125,11 +125,11 @@ static int tx_queue_send_event(struct thread *thread)
|
|||||||
e->retry = NULL;
|
e->retry = NULL;
|
||||||
thread_add_timer(master, tx_queue_send_event, e, 5, &e->retry);
|
thread_add_timer(master, tx_queue_send_event, e, 5, &e->retry);
|
||||||
|
|
||||||
if (e->is_retry) {
|
if (e->is_retry)
|
||||||
queue->circuit->area->lsp_rxmt_count++;
|
queue->circuit->area->lsp_rxmt_count++;
|
||||||
} else {
|
else
|
||||||
e->is_retry = true;
|
e->is_retry = true;
|
||||||
}
|
|
||||||
queue->send_event(queue->circuit, e->lsp, e->type);
|
queue->send_event(queue->circuit, e->lsp, e->type);
|
||||||
/* Don't access e here anymore, send_event might have destroyed it */
|
/* Don't access e here anymore, send_event might have destroyed it */
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@ void isis_tx_queue_free(struct isis_tx_queue *queue);
|
|||||||
_isis_tx_queue_add((queue), (lsp), (type), \
|
_isis_tx_queue_add((queue), (lsp), (type), \
|
||||||
__func__, __FILE__, __LINE__)
|
__func__, __FILE__, __LINE__)
|
||||||
void _isis_tx_queue_add(struct isis_tx_queue *queue, struct isis_lsp *lsp,
|
void _isis_tx_queue_add(struct isis_tx_queue *queue, struct isis_lsp *lsp,
|
||||||
enum isis_tx_type type, const char *func,
|
enum isis_tx_type type, const char *func,
|
||||||
const char *file, int line);
|
const char *file, int line);
|
||||||
|
|
||||||
#define isis_tx_queue_del(queue, lsp) \
|
#define isis_tx_queue_del(queue, lsp) \
|
||||||
_isis_tx_queue_del((queue), (lsp), __func__, __FILE__, __LINE__)
|
_isis_tx_queue_del((queue), (lsp), __func__, __FILE__, __LINE__)
|
||||||
|
@ -120,7 +120,8 @@ static void lsp_print_flooding(struct vty *vty, struct isis_lsp *lsp)
|
|||||||
vty_out(vty, " ago)\n");
|
vty_out(vty, " ago)\n");
|
||||||
|
|
||||||
if (lsp->flooding_circuit_scoped) {
|
if (lsp->flooding_circuit_scoped) {
|
||||||
vty_out(vty, " Received as circuit-scoped LSP, so not flooded.\n");
|
vty_out(vty, " Received as circuit-scoped LSP, so not "
|
||||||
|
"flooded.\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -149,9 +150,8 @@ DEFUN (show_lsp_flooding,
|
|||||||
{
|
{
|
||||||
const char *lspid = NULL;
|
const char *lspid = NULL;
|
||||||
|
|
||||||
if (argc == 4) {
|
if (argc == 4)
|
||||||
lspid = argv[3]->arg;
|
lspid = argv[3]->arg;
|
||||||
}
|
|
||||||
|
|
||||||
struct listnode *node;
|
struct listnode *node;
|
||||||
struct isis_area *area;
|
struct isis_area *area;
|
||||||
|
Loading…
Reference in New Issue
Block a user