On 4/24/2020 11:23 AM, Sriharsha Basavapatna wrote:
For flows that offload partial actions in egress direction,
provide the right netdev to fetch statistics.
Signed-off-by: Sriharsha Basavapatna <[email protected]>
---
lib/dpif-netdev.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 7fcc0b06d..bfe454eb0 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -3199,8 +3199,14 @@ dpif_netdev_get_flow_offload_status(const struct
dp_netdev *dp,
return false;
}
- netdev = netdev_ports_get(netdev_flow->flow.in_port.odp_port,
- dpif_normalize_type(dp->class->type));
+ if (netdev_flow->partial_actions_offloaded &&
+ netdev_flow->egress_offload_port != ODPP_NONE) {
+ netdev = netdev_ports_get(netdev_flow->egress_offload_port,
+ dpif_normalize_type(dp->class->type));
+ } else {
+ netdev = netdev_ports_get(netdev_flow->flow.in_port.odp_port,
+ dpif_normalize_type(dp->class->type));
+ }
As I see, the egress rules have "count" action. It means that packets
are counted twice - both in SW and in HW.
However, note that if they don't have the count action, netdev_flow_get
will fail and dpctl/dump-flows won't show "partial".
if (!netdev) {
return false;
}
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev