mirror of
https://github.com/openvswitch/ovs
synced 2025-09-05 00:35:33 +00:00
dpif-netdev: Avoid hw_miss_packet_recover() for devices with no support.
The hw_miss_packet_recover() API results in performance degradation, for ports that are either not offload capable or do not support this specific offload API. For example, in the test configuration shown below, the vhost-user port does not support offloads and the VF port doesn't support hw_miss offload API. But because tunnel offload needs to be configured in other bridges (br-vxlan and br-phy), OVS has been built with -DALLOW_EXPERIMENTAL_API. br-vhost br-vxlan br-phy vhost-user<-->VF VF-Rep<-->VxLAN uplink-port For every packet between the VF and the vhost-user ports, hw_miss API is called even though it is not supported by the ports involved. This leads to significant performance drop (~3x in some cases; both cycles and pps). Return EOPNOTSUPP when this API fails for a device that doesn't support it and avoid this API on that port for subsequent packets. Signed-off-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
committed by
Ilya Maximets
parent
e7e9973b80
commit
6e50c16518
@@ -2396,8 +2396,12 @@ netdev_offload_dpdk_hw_miss_packet_recover(struct netdev *netdev,
|
||||
odp_port_t vport_odp;
|
||||
int ret = 0;
|
||||
|
||||
if (netdev_dpdk_rte_flow_get_restore_info(netdev, packet,
|
||||
&rte_restore_info, NULL)) {
|
||||
ret = netdev_dpdk_rte_flow_get_restore_info(netdev, packet,
|
||||
&rte_restore_info, NULL);
|
||||
if (ret) {
|
||||
if (ret == -EOPNOTSUPP) {
|
||||
return -ret;
|
||||
}
|
||||
/* This function is called for every packet, and in most cases there
|
||||
* will be no restore info from the HW, thus error is expected.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user