Skip to content

Commit

Permalink
Merge pull request #527 from AltraMayor/prod-log
Browse files Browse the repository at this point in the history
Gatekeeper: optimize logging for production
  • Loading branch information
AltraMayor authored Sep 1, 2021
2 parents 04f3a42 + caaf6f9 commit 1ee27cb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gk/fib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1595,7 +1595,7 @@ add_fib_entry_numerical(struct ip_prefix *prefix_info,
return -1;
} else {
/* Clarify LPM lookup miss that will occur in log. */
GK_LOG(NOTICE, "Prefix lookup did not find existing neighbor FIB on front interface, as expected\n");
GK_LOG(INFO, "Prefix lookup did not find existing neighbor FIB on front interface, as expected\n");
}

neigh_fib = find_fib_entry_for_neighbor_locked(
Expand All @@ -1605,7 +1605,7 @@ add_fib_entry_numerical(struct ip_prefix *prefix_info,
return -1;
} else {
/* Clarify LPM lookup miss that will occur in log. */
GK_LOG(NOTICE, "Prefix lookup did not find existing neighbor FIB on back interface, as expected\n");
GK_LOG(INFO, "Prefix lookup did not find existing neighbor FIB on back interface, as expected\n");
}

for (i = 0; i < num_addrs; i++) {
Expand Down
12 changes: 11 additions & 1 deletion lls/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,17 @@ process_pkts(struct lls_config *lls_conf, struct gatekeeper_if *iface,
*/

default:
LLS_LOG(ERR, "%s interface should not be seeing a packet with EtherType 0x%04hx\n",
/*
* The log level of the following log entry cannot be
* ERR because NICs typically send unmatched patckets
* to queue 0, which the LLS block often serves.
*
* The log level cannot be WARNING either because
* Gatekeeper servers have to tolerate unwanted
* traffic at some vantage points and LLS blocks
* typically run at WARNING level.
*/
LLS_LOG(NOTICE, "%s interface should not be seeing a packet with EtherType 0x%04hx\n",
iface->name, ether_type);
goto free_buf;
}
Expand Down

0 comments on commit 1ee27cb

Please sign in to comment.