Skip to content

Commit a2672e0

Browse files
committed
netdev-offload-dpdk: Change flow offload failure log level.
Previously when a flow was attempted to be offloaded, if it could not be offloaded and did not return an actions error, a warning was logged. The reason there was an exception for an actions error was to allow for failure for full offload of a flow because it will fallback to partial offload. There are some issues with this approach to logging. Some NICs do not specify an actions error, because other config in the NIC may be checked first. e.g. In the case of Mellanox CX-5, there can be different types of offload configured, so an unspecified error may be returned. More generally, enabling hw-offload is best effort per datapath/NIC/flow as full and partial offload support in NICs is variable and there is always fallback to software. So there is likely to be repeated logging about offloading of flows failing. With this in mind, change the log level to debug. The status of the offload can still be seen with below command: $ ovs-appctl dpctl/dump-flows -m ... offloaded:partial ... Also, remove some duplicated rate limiting and tidy-up the succeed and failure logs. Signed-off-by: Kevin Traynor <[email protected]> --- v2: combined logs on failure and added confirmation of result on succeed.
1 parent 252ee0f commit a2672e0

File tree

1 file changed

+9
-14
lines changed

1 file changed

+9
-14
lines changed

lib/netdev-offload-dpdk.c

+9-14
Original file line numberDiff line numberDiff line change
@@ -919,24 +919,19 @@ netdev_offload_dpdk_flow_create(struct netdev *netdev,
919919
if (!VLOG_DROP_DBG(&rl)) {
920920
dump_flow(&s, &s_extra, attr, flow_patterns, flow_actions);
921921
extra_str = ds_cstr(&s_extra);
922-
VLOG_DBG_RL(&rl, "%s: rte_flow 0x%"PRIxPTR" %s flow create %d %s",
923-
netdev_get_name(netdev), (intptr_t) flow, extra_str,
924-
netdev_dpdk_get_port_id(netdev), ds_cstr(&s));
922+
VLOG_DBG("%s: rte_flow creation succeeded: rte_flow 0x%"PRIxPTR" "
923+
"%s flow create %d %s", netdev_get_name(netdev),
924+
(intptr_t) flow, extra_str,
925+
netdev_dpdk_get_port_id(netdev), ds_cstr(&s));
925926
}
926927
} else {
927-
enum vlog_level level = VLL_WARN;
928-
929-
if (error->type == RTE_FLOW_ERROR_TYPE_ACTION) {
930-
level = VLL_DBG;
931-
}
932-
VLOG_RL(&rl, level, "%s: rte_flow creation failed: %d (%s).",
933-
netdev_get_name(netdev), error->type, error->message);
934-
if (!vlog_should_drop(&this_module, level, &rl)) {
928+
if (!VLOG_DROP_DBG(&rl)) {
935929
dump_flow(&s, &s_extra, attr, flow_patterns, flow_actions);
936930
extra_str = ds_cstr(&s_extra);
937-
VLOG_RL(&rl, level, "%s: Failed flow: %s flow create %d %s",
938-
netdev_get_name(netdev), extra_str,
939-
netdev_dpdk_get_port_id(netdev), ds_cstr(&s));
931+
VLOG_DBG("%s: rte_flow creation failed [%d (%s)]: "
932+
"%s flow create %d %s", netdev_get_name(netdev),
933+
error->type, error->message,extra_str,
934+
netdev_dpdk_get_port_id(netdev), ds_cstr(&s));
940935
}
941936
}
942937
ds_destroy(&s);

0 commit comments

Comments
 (0)