]> git.droids-corp.org - dpdk.git/commitdiff
eventdev: make ethdev port identifiers 16-bit
authorNikhil Rao <nikhil.rao@intel.com>
Wed, 9 May 2018 20:52:40 +0000 (02:22 +0530)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 10 May 2018 16:04:31 +0000 (18:04 +0200)
Ethernet port ID data size has been extended to 16 bits size 17.11
Update the Rx event adapter interface and implementation accordingly.

This commit bumps the library version to refect the ABI change
caused by extending the ethernet port parameter in Rx adapter
functions from 8 to 16 bits.

Fixes: 9c38b704d280 ("eventdev: add eth Rx adapter implementation")
Cc: stable@dpdk.org
Signed-off-by: Nikhil Rao <nikhil.rao@intel.com>
doc/guides/rel_notes/release_18_05.rst
lib/librte_eventdev/Makefile
lib/librte_eventdev/meson.build
lib/librte_eventdev/rte_event_eth_rx_adapter.c
lib/librte_eventdev/rte_event_eth_rx_adapter.h

index db6e60fb99bad424a44633beee19e07379157f32..beccfa9b2d49ea94586ca2774485c8668f8c28f5 100644 (file)
@@ -457,7 +457,7 @@ The libraries prepended with a plus sign were incremented in this version.
      librte_distributor.so.1
    + librte_eal.so.7
    + librte_ethdev.so.9
-     librte_eventdev.so.3
+   + librte_eventdev.so.4
      librte_flow_classify.so.1
      librte_gro.so.1
      librte_gso.so.1
index 1a7b9c8dc9639317efba9a3456844739264727c7..b3e25464b5ef20792efe5e2fa4011694979473b0 100644 (file)
@@ -8,7 +8,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 LIB = librte_eventdev.a
 
 # library version
-LIBABIVER := 3
+LIBABIVER := 4
 
 # build flags
 CFLAGS += -DALLOW_EXPERIMENTAL_API
index 13961461d4b3d6d37b0cdad1bbf74a9dede49b55..bd138bd57113efff91fdc9cc263bf7933f15000e 100644 (file)
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: BSD-3-Clause
 # Copyright(c) 2017 Intel Corporation
 
-version = 3
+version = 4
 allow_experimental_apis = true
 sources = files('rte_eventdev.c',
                'rte_event_ring.c',
index 4c0c02530381c7e7813521ef3cc67545b84076f3..6f7050952fc2b35a35c47d8f8527aa352c4640a3 100644 (file)
@@ -31,7 +31,7 @@
  */
 struct eth_rx_poll_entry {
        /* Eth port to poll */
-       uint8_t eth_dev_id;
+       uint16_t eth_dev_id;
        /* Eth rx queue to poll */
        uint16_t eth_rx_qid;
 };
@@ -168,7 +168,7 @@ wrr_next(struct rte_event_eth_rx_adapter *rx_adapter,
 
        while (1) {
                uint16_t q;
-               uint8_t d;
+               uint16_t d;
 
                i = (i + 1) % n;
                if (i == 0) {
@@ -190,7 +190,7 @@ wrr_next(struct rte_event_eth_rx_adapter *rx_adapter,
 static int
 eth_poll_wrr_calc(struct rte_event_eth_rx_adapter *rx_adapter)
 {
-       uint8_t d;
+       uint16_t d;
        uint16_t q;
        unsigned int i;
 
@@ -510,7 +510,7 @@ eth_rx_poll(struct rte_event_eth_rx_adapter *rx_adapter)
        for (num_queue = 0; num_queue < rx_adapter->wrr_len; num_queue++) {
                unsigned int poll_idx = rx_adapter->wrr_sched[wrr_pos];
                uint16_t qid = rx_adapter->eth_rx_poll[poll_idx].eth_rx_qid;
-               uint8_t d = rx_adapter->eth_rx_poll[poll_idx].eth_dev_id;
+               uint16_t d = rx_adapter->eth_rx_poll[poll_idx].eth_dev_id;
 
                /* Don't do a batch dequeue from the rx queue if there isn't
                 * enough space in the enqueue buffer.
@@ -755,7 +755,7 @@ event_eth_rx_adapter_queue_add(struct rte_event_eth_rx_adapter *rx_adapter,
 }
 
 static int add_rx_queue(struct rte_event_eth_rx_adapter *rx_adapter,
-               uint8_t eth_dev_id,
+               uint16_t eth_dev_id,
                int rx_queue_id,
                const struct rte_event_eth_rx_adapter_queue_conf *queue_conf)
 {
@@ -859,7 +859,7 @@ rte_event_eth_rx_adapter_create_ext(uint8_t id, uint8_t dev_id,
        struct rte_event_eth_rx_adapter *rx_adapter;
        int ret;
        int socket_id;
-       uint8_t i;
+       uint16_t i;
        char mem_name[ETH_RX_ADAPTER_SERVICE_NAME_LEN];
        const uint8_t default_rss_key[] = {
                0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2,
@@ -978,7 +978,7 @@ rte_event_eth_rx_adapter_free(uint8_t id)
 
 int
 rte_event_eth_rx_adapter_queue_add(uint8_t id,
-               uint8_t eth_dev_id,
+               uint16_t eth_dev_id,
                int32_t rx_queue_id,
                const struct rte_event_eth_rx_adapter_queue_conf *queue_conf)
 {
@@ -1002,7 +1002,7 @@ rte_event_eth_rx_adapter_queue_add(uint8_t id,
                                                &cap);
        if (ret) {
                RTE_EDEV_LOG_ERR("Failed to get adapter caps edev %" PRIu8
-                       "eth port %" PRIu8, id, eth_dev_id);
+                       "eth port %" PRIu16, id, eth_dev_id);
                return ret;
        }
 
@@ -1010,7 +1010,7 @@ rte_event_eth_rx_adapter_queue_add(uint8_t id,
                && (queue_conf->rx_queue_flags &
                        RTE_EVENT_ETH_RX_ADAPTER_QUEUE_FLOW_ID_VALID)) {
                RTE_EDEV_LOG_ERR("Flow ID override is not supported,"
-                               " eth port: %" PRIu8 " adapter id: %" PRIu8,
+                               " eth port: %" PRIu16 " adapter id: %" PRIu8,
                                eth_dev_id, id);
                return -EINVAL;
        }
@@ -1018,7 +1018,8 @@ rte_event_eth_rx_adapter_queue_add(uint8_t id,
        if ((cap & RTE_EVENT_ETH_RX_ADAPTER_CAP_MULTI_EVENTQ) == 0 &&
                (rx_queue_id != -1)) {
                RTE_EDEV_LOG_ERR("Rx queues can only be connected to single "
-                       "event queue id %u eth port %u", id, eth_dev_id);
+                       "event queue, eth port: %" PRIu16 " adapter id: %"
+                       PRIu8, eth_dev_id, id);
                return -EINVAL;
        }
 
@@ -1075,7 +1076,7 @@ rte_event_eth_rx_adapter_queue_add(uint8_t id,
 }
 
 int
-rte_event_eth_rx_adapter_queue_del(uint8_t id, uint8_t eth_dev_id,
+rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id,
                                int32_t rx_queue_id)
 {
        int ret = 0;
index e6a643534829f292b6d1d8f54b78be1348f49c71..834eb5341f9b127645abe7898035b2d8c4bb463d 100644 (file)
@@ -307,7 +307,7 @@ int rte_event_eth_rx_adapter_free(uint8_t id);
  *  combination of the two error codes.
  */
 int rte_event_eth_rx_adapter_queue_add(uint8_t id,
-                       uint8_t eth_dev_id,
+                       uint16_t eth_dev_id,
                        int32_t rx_queue_id,
                        const struct rte_event_eth_rx_adapter_queue_conf *conf);
 
@@ -335,7 +335,7 @@ int rte_event_eth_rx_adapter_queue_add(uint8_t id,
  *  - 0: Success, Receive queue deleted correctly.
  *  - <0: Error code on failure.
  */
-int rte_event_eth_rx_adapter_queue_del(uint8_t id, uint8_t eth_dev_id,
+int rte_event_eth_rx_adapter_queue_del(uint8_t id, uint16_t eth_dev_id,
                                       int32_t rx_queue_id);
 
 /**