pusnow1
November 13, 2025, 10:35pm
1
Hi, I’m trying to forward packet from a port to the same port using DOCA-Flow.
By changing following code line to fwd.port_id = port_id; (The original code works perfectly)
However, it resulted in segfault in doca flow library. Is there any way to forward packets from and to the same port?
goto destroy_pipe_cfg;
}
result = doca_flow_pipe_cfg_set_actions(pipe_cfg, actions_arr, NULL, NULL, NB_ACTIONS_ARR);
if (result != DOCA_SUCCESS) {
DOCA_LOG_ERR("Failed to set doca_flow_pipe_cfg actions: %s", doca_error_get_descr(result));
goto destroy_pipe_cfg;
}
/* forwarding traffic to other port */
fwd.type = DOCA_FLOW_FWD_PORT;
fwd.port_id = port_id ^ 1;
result = doca_flow_pipe_create(pipe_cfg, &fwd, NULL, pipe);
destroy_pipe_cfg:
doca_flow_pipe_cfg_destroy(pipe_cfg);
return result;
}
/*
* Add DOCA Flow pipe entry to the port forwarding pipe
*
Hello @pusnow1 ,
Thank you for posting your query on our community.
According to the NVIDIA DOCA Flow documentation, a port cannot be paired with itself — which implies that forwarding packets from a port back to the same port is not supported.
You can find the relevant statement under the API documentation for doca_flow_port_pair.
Thanks,
Bhargavi
system
Closed
December 28, 2025, 5:53pm
3
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.