Skip to content

Commit

Permalink
netdev-offload-dpdk: Fix crash in debug log.
Browse files Browse the repository at this point in the history
The offload thread calling ufid_to_rte_flow_disassociate() may be the
last one holding a reference on the netdev and physdev.
So displaying information about them might trigger a crash when
removing a physical port.

Fixes: faf71e4 ("netdev-dpdk: Print port name in offload API messages.")
Acked-by: Mike Pattrick <[email protected]>
Signed-off-by: David Marchand <[email protected]>
Signed-off-by: Ilya Maximets <[email protected]>
  • Loading branch information
david-marchand authored and igsilya committed May 29, 2023
1 parent 9dad8df commit c3e410a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/netdev-offload-dpdk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2345,13 +2345,13 @@ netdev_offload_dpdk_flow_destroy(struct ufid_to_rte_flow_data *rte_flow_data)
ovsrcu_get(void *, &netdev->hw_info.offload_data);
data->rte_flow_counters[tid]--;

ufid_to_rte_flow_disassociate(rte_flow_data);
VLOG_DBG_RL(&rl, "%s/%s: rte_flow 0x%"PRIxPTR
" flow destroy %d ufid " UUID_FMT,
netdev_get_name(netdev), netdev_get_name(physdev),
(intptr_t) rte_flow,
netdev_dpdk_get_port_id(physdev),
UUID_ARGS((struct uuid *) ufid));
ufid_to_rte_flow_disassociate(rte_flow_data);
} else {
VLOG_ERR("Failed flow: %s/%s: flow destroy %d ufid " UUID_FMT,
netdev_get_name(netdev), netdev_get_name(physdev),
Expand Down

0 comments on commit c3e410a

Please sign in to comment.