Calling dpif_probe_feature() should return if supported or not
without relation to the dpif name.

Signed-off-by: Roi Dayan <r...@nvidia.com>
Reviewed-by: Eli Britstein <el...@nvidia.com>
---
 lib/dpif.c             | 7 -------
 lib/dpif.h             | 1 -
 ofproto/ofproto-dpif.c | 4 ++--
 3 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/lib/dpif.c b/lib/dpif.c
index a064f717f1a6..c22a47c3c15e 100644
--- a/lib/dpif.c
+++ b/lib/dpif.c
@@ -1953,13 +1953,6 @@ dpif_supports_lb_output_action(const struct dpif *dpif)
     return dpif_is_netdev(dpif);
 }
 
-bool
-dpif_may_support_psample(const struct dpif *dpif)
-{
-    /* Userspace datapath does not support this action. */
-    return !dpif_is_netdev(dpif);
-}
-
 /* Meters */
 void
 dpif_meter_get_features(const struct dpif *dpif,
diff --git a/lib/dpif.h b/lib/dpif.h
index 6bef7d5b304d..a764e8a592bd 100644
--- a/lib/dpif.h
+++ b/lib/dpif.h
@@ -941,7 +941,6 @@ int dpif_get_pmds_for_port(const struct dpif * dpif, 
odp_port_t port_no,
 char *dpif_get_dp_version(const struct dpif *);
 bool dpif_supports_tnl_push_pop(const struct dpif *);
 bool dpif_may_support_explicit_drop_action(const struct dpif *);
-bool dpif_may_support_psample(const struct dpif *);
 bool dpif_synced_dp_layers(struct dpif *);
 
 /* Log functions. */
diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c
index ed9e44ce2b03..91f8f4deebd0 100644
--- a/ofproto/ofproto-dpif.c
+++ b/ofproto/ofproto-dpif.c
@@ -1646,8 +1646,8 @@ check_psample(struct dpif_backer *backer)
 
     odp_put_psample_action(&actions, 10, cookie, sizeof cookie);
 
-    supported = dpif_may_support_psample(backer->dpif) &&
-        dpif_probe_feature(backer->dpif, "psample", &key, &actions, NULL);
+    supported = dpif_probe_feature(backer->dpif, "psample", &key, &actions,
+                                   NULL);
 
     ofpbuf_uninit(&actions);
     VLOG_INFO("%s: Datapath %s psample action", dpif_name(backer->dpif),
-- 
2.21.0

_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to