Skip to content

Commit

Permalink
Add better cmdline argument checks for multiport-eswitch
Browse files Browse the repository at this point in the history
  • Loading branch information
PlagueCZ committed Oct 18, 2024
1 parent 722a29d commit 438850f
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions src/dp_service.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,26 @@ static int run_service(void)
return DP_ERROR;
}

if (dp_conf_is_multiport_eswitch() && dp_conf_is_offload_enabled()) {
DP_EARLY_ERR("HW offloading is currently not supported for multi-port eswitch mode");
return DP_ERROR;
if (dp_conf_is_multiport_eswitch()) {
if (dp_conf_is_offload_enabled()) {
DP_EARLY_ERR("HW offloading is currently not supported for multi-port eswitch mode");
return DP_ERROR;
}
#ifdef ENABLE_PF1_PROXY
if (dp_conf_is_pf1_proxy_enabled()) {
if (*dp_conf_get_pf1_proxy_vf() == '\0') {
DP_EARLY_ERR("PF1-proxy also requires --pf1-proxy-vf argument to be set");
return DP_ERROR;
}
}
#endif
} else {
#ifdef ENABLE_PF1_PROXY
if (dp_conf_is_pf1_proxy_enabled()) {
DP_EARLY_ERR("PF1-proxy is only supported for multiport-eswitch mode");
return DP_ERROR;
}
#endif
}

if (DP_FAILED(dp_log_init()))
Expand Down

0 comments on commit 438850f

Please sign in to comment.