]> git.droids-corp.org - dpdk.git/commitdiff
examples/l3fwd: share queue size variables
authorHonnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Wed, 23 Feb 2022 06:09:30 +0000 (00:09 -0600)
committerThomas Monjalon <thomas@monjalon.net>
Tue, 8 Mar 2022 09:21:49 +0000 (10:21 +0100)
nb_rxd and nb_txd are used in polling mode and event mode of
operation. nb_rxd and nb_txd are already global in polling mode
but are not visible to event mode code. Make them visible to all
parts of the application.

Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli@arm.com>
Reviewed-by: Kathleen Capella <kathleen.capella@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Tested-by: Yingya Han < yingyax.han@intel.com>
examples/l3fwd/l3fwd.h
examples/l3fwd/l3fwd_event.c
examples/l3fwd/main.c

index 002510b8513b5cca5d8e7464070858b28fcb7a8e..ad39496e6431235eb4488bb2c2219406b9947fb4 100644 (file)
@@ -86,6 +86,10 @@ struct lcore_conf {
 
 extern volatile bool force_quit;
 
+/* RX and TX queue depths */
+extern uint16_t nb_rxd;
+extern uint16_t nb_txd;
+
 /* ethernet addresses of ports */
 extern uint64_t dest_eth_addr[RTE_MAX_ETHPORTS];
 extern struct rte_ether_addr ports_eth_addr[RTE_MAX_ETHPORTS];
index dd9eafa9b9cfdf7d46179aacde27caca8fabbe59..7a401290f8bd4aae9651c8a930acb35fb4e49483 100644 (file)
@@ -43,8 +43,6 @@ l3fwd_eth_dev_port_setup(struct rte_eth_conf *port_conf)
 {
        struct l3fwd_event_resources *evt_rsrc = l3fwd_get_eventdev_rsrc();
        uint16_t nb_ports = rte_eth_dev_count_avail();
-       uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
-       uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
        unsigned int nb_lcores = rte_lcore_count();
        struct rte_eth_conf local_port_conf;
        struct rte_eth_dev_info dev_info;
index 05652a560a0b653a64d626d8c1910f0988f418af..a49f418796eed69477e3a08e673da8045dfc2d2c 100644 (file)
@@ -53,9 +53,8 @@
 
 #define MAX_LCORE_PARAMS 1024
 
-/* Static global variables used within this file. */
-static uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
-static uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
+uint16_t nb_rxd = RTE_TEST_RX_DESC_DEFAULT;
+uint16_t nb_txd = RTE_TEST_TX_DESC_DEFAULT;
 
 /**< Ports set in promiscuous mode off by default. */
 static int promiscuous_on;