The problem I’m trying to solve with DOCA 2.7 with ConnectX-7 NIC is: While running the gpu_packet_processing application the mlnx_perf shows network packets that do not get processed by the defined DOCA flows.
For example:
rx_vport_multicast_packets: 1
rx_vport_multicast_bytes: 60 Bps = 0 Mbps
rx_vport_broadcast_packets: 1,236,605
rx_vport_broadcast_bytes: 10,216,830,510 Bps = 81,734.64 Mbps
rx_packets_phy: 1,236,607
rx_bytes_phy: 10,221,776,994 Bps = 81,774.21 Mbps
rx_multicast_phy: 1
rx_broadcast_phy: 1,236,605
rx_64_bytes_phy: 1 Bps = 0 Mbps
rx_8192_to_10239_bytes_phy: 1,236,604
rx_prio0_bytes: 10,221,776,994 Bps = 81,774.21 Mbps
rx_prio0_packets: 1,236,606
Using DOCA 2.7 with ConnectX-7 NIC how can I define a DOCA control pipe entry using doca_flow_pipe_control_add_entry()
to define a lowest priority control pipe entry that just drops all packets to ensure the host CPU kernel does not receive any packets?
Here’s what I’ve attempted and failed…
In the GPU_Packet_Processing application and updated the flow.c routine
doca_error_t create_root_pipe(struct rxq_udp_queues *udp_queues,
struct rxq_tcp_queues *tcp_queues,
struct rxq_icmp_queues *icmp_queues,
struct doca_flow_port *port)
before call to result = doca_flow_entries_process(port, 0, default_flow_timeout_usec, 0);
<INSERTED_CODE>
uint32_t priority_lowest = 4;
struct doca_flow_match match_passthru_mask = {0}; // 0=wildcard anything
struct doca_flow_fwd fwd = {
.type = DOCA_FLOW_FWD_DROP, // no next pipe because we're just forwarding the packet
.next_pipe = NULL
};
// where doca_flow_desc_field contains string like: * "outer.eth.src_mac" "tunnel.gre.protocol", "inner.ipv4.next_proto"
// NULL in any parameters effectively disables or ignores specific API feature.
result = doca_flow_pipe_control_add_entry(0, // queue identifier (for root pipe control list entries)
priority_lowest, // priority value, lower value 0 has highest priority, larger values have lower priority
udp_queues->root_pipe, // pointer to doca_flow_pipe, the root pipe
NULL, // pointer to doca_flow_match to indicate specific match info (0's to match all)
&match_passthru_mask, // pointer to doca_flow_match mask, 0's to match all
NULL, // pointer doca_flow_match_condition to include doca_flow_desc_field A descriptor, doca_flow_desc_field B descriptor, A operation B, and field width
NULL, // pointer doca_flow_actions to modify actions, indicate specific modify to packet header information (not payload)
NULL, // pointer doca_flow_actions mask for specific actions
NULL, // pointer doca_flow_action_descs for action descripors
NULL, // pointer doca_flow_monitor to monitor actions
&fwd, // pointer doca_flow_fwd to fwd specific operations
NULL, // Pointer voi* to user context can be used to pass user specific context information
&udp_queues->root_host_entry); // Double pointer to doca_flow_pipe_entry handler on success
if (result != DOCA_SUCCESS) {
DOCA_LOG_ERR("HOST_PASSTHRU pipe entry creation failed with: %s", doca_error_get_descr(result));
return result;
} else {
DOCA_LOG_INFO("HOST_PASSTHRU pipe created");
}
<\INSERTED_CODE>