diff --git a/config/dynamic.c b/config/dynamic.c
index 1a7a08f8..38e69f47 100644
--- a/config/dynamic.c
+++ b/config/dynamic.c
@@ -16,13 +16,9 @@
* along with this program. If not, see .
*/
-/* For gettid(). */
-#define _GNU_SOURCE
-
#include
#include
#include
-#include
#include
#include
#include
@@ -621,8 +617,8 @@ dyn_cfg_proc(void *arg)
int ret = 0;
struct dynamic_config *dy_conf = arg;
- G_LOG(NOTICE,
- "The Dynamic Config block is running at tid = %u\n", gettid());
+ G_LOG(NOTICE, "The Dynamic Config block is running at tid = %u\n",
+ rte_gettid());
if (dy_conf->gt != NULL) {
/*
diff --git a/cps/main.c b/cps/main.c
index 8bf8b5f4..4a0ca788 100644
--- a/cps/main.c
+++ b/cps/main.c
@@ -16,11 +16,7 @@
* along with this program. If not, see .
*/
-/* For gettid(). */
-#define _GNU_SOURCE
-
#include
-#include
#include "gatekeeper_cps.h"
#include "gatekeeper_l2.h"
@@ -688,7 +684,7 @@ cps_proc(void *arg)
*/
cap_value_t caps[] = {CAP_NET_ADMIN, CAP_SYS_MODULE};
- G_LOG(NOTICE, "The CPS block is running at tid = %u\n", gettid());
+ G_LOG(NOTICE, "The CPS block is running at tid = %u\n", rte_gettid());
if (needed_caps(RTE_DIM(caps), caps) < 0) {
G_LOG(ERR, "Could not set needed capabilities\n");
diff --git a/ggu/main.c b/ggu/main.c
index 1ab4a82d..de2dbd02 100644
--- a/ggu/main.c
+++ b/ggu/main.c
@@ -16,11 +16,7 @@
* along with this program. If not, see .
*/
-/* For gettid(). */
-#define _GNU_SOURCE
-
#include
-#include
#include
#include
@@ -586,7 +582,7 @@ ggu_proc(void *arg)
uint16_t rx_queue = ggu_conf->rx_queue_back;
uint16_t max_pkt_burst = ggu_conf->max_pkt_burst;
- G_LOG(NOTICE, "The GT-GK unit is running at tid = %u\n", gettid());
+ G_LOG(NOTICE, "The GT-GK unit is running at tid = %u\n", rte_gettid());
if (needed_caps(0, NULL) < 0) {
G_LOG(ERR, "Could not set needed capabilities\n");
diff --git a/gk/main.c b/gk/main.c
index eadd3598..b576781e 100644
--- a/gk/main.c
+++ b/gk/main.c
@@ -16,15 +16,11 @@
* along with this program. If not, see .
*/
-/* For gettid(). */
-#define _GNU_SOURCE
-
#include
#include
#include
#include
#include
-#include
#include
#include
@@ -2350,7 +2346,7 @@ gk_proc(void *arg)
uint32_t scan_iter = gk_conf->flow_table_scan_iter;
uint32_t iter_count = 0;
- G_LOG(NOTICE, "The GK block is running at tid = %u\n", gettid());
+ G_LOG(NOTICE, "The GK block is running at tid = %u\n", rte_gettid());
if (needed_caps(0, NULL) < 0) {
G_LOG(ERR, "Could not set needed capabilities\n");
diff --git a/gt/main.c b/gt/main.c
index 335a1198..ad320f61 100644
--- a/gt/main.c
+++ b/gt/main.c
@@ -16,16 +16,12 @@
* along with this program. If not, see .
*/
-/* For gettid(). */
-#define _GNU_SOURCE
-
#include
#include
#include
#include
#include
#include
-#include
#include
#include
@@ -1617,7 +1613,7 @@ gt_proc(void *arg)
death_row.cnt = 0;
gt_max_pkt_burst = gt_conf->max_pkt_burst;
- G_LOG(NOTICE, "The GT block is running at tid = %u\n", gettid());
+ G_LOG(NOTICE, "The GT block is running at tid = %u\n", rte_gettid());
if (needed_caps(RTE_DIM(caps), caps) < 0) {
G_LOG(ERR, "Could not set needed capabilities\n");
diff --git a/lib/net.c b/lib/net.c
index eb0412b1..44aa2846 100644
--- a/lib/net.c
+++ b/lib/net.c
@@ -1224,6 +1224,8 @@ check_if_rss(struct gatekeeper_if *iface,
* hash functions.
*/
iface->rss = true;
+ port_conf->rx_adv_conf.rss_conf.algorithm =
+ RTE_ETH_HASH_FUNCTION_DEFAULT;
port_conf->rx_adv_conf.rss_conf.rss_hf = 0;
if (ipv4_if_configured(iface)) {
port_conf->rx_adv_conf.rss_conf.rss_hf |=
@@ -1345,6 +1347,7 @@ check_if_rss(struct gatekeeper_if *iface,
disable_rss:
iface->rss = false;
+ port_conf->rxmode.mq_mode = RTE_ETH_MQ_RX_NONE;
port_conf->rx_adv_conf.rss_conf.rss_hf = 0;
iface->num_rx_queues = 1;
G_LOG(WARNING, "%s(%s): the interface does not have RSS capabilities; the GK or GT block will receive all packets and send them to the other blocks as needed. Gatekeeper or Grantor should only be run with one lcore dedicated to GK or GT in this mode; restart with only one GK or GT lcore if necessary\n",
@@ -1973,12 +1976,7 @@ monitor_links(struct gatekeeper_if *iface)
static int
init_iface(struct gatekeeper_if *iface)
{
- struct rte_eth_conf port_conf = {
- .rxmode = {
- .mq_mode = RTE_ETH_MQ_RX_NONE,
- },
- /* Other offloads configured below. */
- };
+ struct rte_eth_conf port_conf = {};
unsigned int i;
int ret;
diff --git a/lib/rib.c b/lib/rib.c
index 41465688..36b7c571 100644
--- a/lib/rib.c
+++ b/lib/rib.c
@@ -106,7 +106,8 @@ int
rib_create(struct rib_head *rib, const char *name, int socket_id,
uint8_t max_length, uint32_t max_rules)
{
- rib_address_t dummy;
+ /* Initialize to avoid warning: ‘dummy’ may be used uninitialized. */
+ rib_address_t dummy = 0;
int ret;
unsigned int n;
diff --git a/lls/main.c b/lls/main.c
index 9a071ad1..4e737f43 100644
--- a/lls/main.c
+++ b/lls/main.c
@@ -16,11 +16,7 @@
* along with this program. If not, see .
*/
-/* For gettid(). */
-#define _GNU_SOURCE
-
#include
-#include
#include
#include
@@ -681,7 +677,7 @@ lls_proc(void *arg)
uint64_t timer_resolution_cycles =
net_conf->rotate_log_interval_sec * cycles_per_sec;
- G_LOG(NOTICE, "The LLS block is running at tid = %u\n", gettid());
+ G_LOG(NOTICE, "The LLS block is running at tid = %u\n", rte_gettid());
if (needed_caps(0, NULL) < 0) {
G_LOG(ERR, "Could not set needed capabilities\n");
diff --git a/sol/main.c b/sol/main.c
index 88f41e10..7c1bfe79 100644
--- a/sol/main.c
+++ b/sol/main.c
@@ -16,11 +16,7 @@
* along with this program. If not, see .
*/
-/* For gettid(). */
-#define _GNU_SOURCE
-
#include
-#include
#include
#include
@@ -517,7 +513,8 @@ sol_proc(void *arg)
struct sol_instance *instance = &sol_conf->instances[block_idx];
uint8_t tx_port_back = sol_conf->net->back.id;
- G_LOG(NOTICE, "The Solicitor block is running at tid = %u\n", gettid());
+ G_LOG(NOTICE, "The Solicitor block is running at tid = %u\n",
+ rte_gettid());
if (needed_caps(0, NULL) < 0) {
G_LOG(ERR, "Could not set needed capabilities\n");