[v2,1/1] api: packetio: deprecate redundant loop_supported field in capability

Message ID 1501696806-12054-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series
  • [v2,1/1] api: packetio: deprecate redundant loop_supported field in capability
Related show

Commit Message

Github ODP bot Aug. 2, 2017, 6 p.m.
From: Balasubramanian Manoharan <bala.manoharan@linaro.org>


removes redundant loop_supported boolean in odp_pktio_capability_t
Fixes https://bugs.linaro.org/show_bug.cgi?id=2861

Signed-off-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>

---
/** Email created from pull request 105 (bala-manoharan:BUG2861)
 ** https://github.com/Linaro/odp/pull/105
 ** Patch: https://github.com/Linaro/odp/pull/105.patch
 ** Base sha: a2040db93b114fb9e1da9aeca1d0a1ea91699448
 ** Merge commit sha: 42188b7d28e6ec7d2fc696f14b40e024ff08d639
 **/
 include/odp/api/spec/packet_io.h       | 8 +++-----
 platform/linux-generic/odp_packet_io.c | 2 +-
 2 files changed, 4 insertions(+), 6 deletions(-)

Patch hide | download patch | download mbox

diff --git a/include/odp/api/spec/packet_io.h b/include/odp/api/spec/packet_io.h
index cec1f22a..76c63e72 100644
--- a/include/odp/api/spec/packet_io.h
+++ b/include/odp/api/spec/packet_io.h
@@ -19,6 +19,7 @@ 
 extern "C" {
 #endif
 
+#include <odp/api/deprecated.h>
 #include <odp/api/packet_io_stats.h>
 #include <odp/api/queue.h>
 #include <odp/api/time.h>
@@ -445,11 +446,8 @@  typedef struct odp_pktio_capability_t {
 	 * set to zero. */
 	odp_pktio_set_op_t set_op;
 
-	/** Support of Loopback mode
-	 *
-	 * A boolean to denote whether loop back mode is supported on this
-	 * specific interface. */
-	odp_bool_t loop_supported;
+	/** @deprecated Use enable_loop inside odp_pktin_config_t */
+	odp_bool_t ODP_DEPRECATE(loop_supported);
 } odp_pktio_capability_t;
 
 /**
diff --git a/platform/linux-generic/odp_packet_io.c b/platform/linux-generic/odp_packet_io.c
index 64c6e452..94075567 100644
--- a/platform/linux-generic/odp_packet_io.c
+++ b/platform/linux-generic/odp_packet_io.c
@@ -416,7 +416,7 @@  int odp_pktio_config(odp_pktio_t hdl, const odp_pktio_config_t *config)
 		return -1;
 	}
 
-	if (config->enable_loop && !capa.loop_supported) {
+	if (config->enable_loop && !capa.config.enable_loop) {
 		ODP_ERR("Loopback mode not supported\n");
 		return -1;
 	}