event/sw: add eth Rx adapter capabilities function
authorNikhil Rao <nikhil.rao@intel.com>
Tue, 10 Oct 2017 22:21:33 +0000 (03:51 +0530)
committerJerin Jacob <jerin.jacob@caviumnetworks.com>
Tue, 10 Oct 2017 16:33:19 +0000 (18:33 +0200)
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
drivers/event/sw/sw_evdev.c
lib/librte_eventdev/rte_eventdev_pmd.h

index da6ac30..aed8b72 100644 (file)
@@ -437,6 +437,19 @@ sw_dev_configure(const struct rte_eventdev *dev)
        return 0;
 }
 
+struct rte_eth_dev;
+
+static int
+sw_eth_rx_adapter_caps_get(const struct rte_eventdev *dev,
+                       const struct rte_eth_dev *eth_dev,
+                       uint32_t *caps)
+{
+       RTE_SET_USED(dev);
+       RTE_SET_USED(eth_dev);
+       *caps = RTE_EVENT_ETH_RX_ADAPTER_SW_CAP;
+       return 0;
+}
+
 static void
 sw_info_get(struct rte_eventdev *dev, struct rte_event_dev_info *info)
 {
@@ -751,6 +764,8 @@ sw_probe(struct rte_vdev_device *vdev)
                        .port_link = sw_port_link,
                        .port_unlink = sw_port_unlink,
 
+                       .eth_rx_adapter_caps_get = sw_eth_rx_adapter_caps_get,
+
                        .xstats_get = sw_xstats_get,
                        .xstats_get_names = sw_xstats_get_names,
                        .xstats_get_by_name = sw_xstats_get_by_name,
index 9f3188f..4369d9b 100644 (file)
@@ -83,6 +83,14 @@ extern "C" {
        } \
 } while (0)
 
+#define RTE_EVENT_ETH_RX_ADAPTER_SW_CAP \
+               ((RTE_EVENT_ETH_RX_ADAPTER_CAP_OVERRIDE_FLOW_ID) | \
+                       (RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ))
+
+/**< Ethernet Rx adapter cap to return If the packet transfers from
+ * the ethdev to eventdev use a SW service function
+ */
+
 #define RTE_EVENTDEV_DETACHED  (0)
 #define RTE_EVENTDEV_ATTACHED  (1)