fix global variable issues
authorFerruh Yigit <ferruh.yigit@intel.com>
Sun, 28 Oct 2018 23:57:40 +0000 (23:57 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 29 Oct 2018 01:34:27 +0000 (02:34 +0100)
Various fixes related to the global variable usage.

Fixes: 43e610bb8565 ("compress/octeontx: introduce octeontx zip PMD")
Fixes: c378f084d6e3 ("compress/octeontx: add device setup ops")
Fixes: b43ebc65aada ("compress/octeontx: create private xform")
Fixes: b1ce8ebd97ba ("eventdev: add PMD callbacks for eth Rx adapter")
Fixes: 3810ae435783 ("eventdev: add interrupt driven queues to Rx adapter")
Fixes: fefed3d1e62c ("enic: new driver")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Reviewed-by: Nikhil Rao <nikhil.rao@intel.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
drivers/compress/octeontx/include/zip_regs.h
drivers/compress/octeontx/otx_zip.h
drivers/event/octeontx/ssovf_evdev.c
drivers/net/enic/enic_ethdev.c
lib/librte_eventdev/rte_event_eth_rx_adapter.c
lib/librte_eventdev/rte_eventdev_pmd.h

index 1e74db4..04c3d75 100644 (file)
  * ZIP compression coding Enumeration
  * Enumerates ZIP_INST_S[CC].
  */
-enum {
+enum zip_cc {
        ZIP_CC_DEFAULT = 0,
        ZIP_CC_DYN_HUFF,
        ZIP_CC_FIXED_HUFF,
        ZIP_CC_LZS
-} zip_cc;
+};
 
 /**
  * Register (NCB) zip_vq#_ena
index 99a38d0..3abefd1 100644 (file)
@@ -79,7 +79,7 @@ int octtx_zip_logtype_driver;
        ZIP_PMD_LOG(ERR, fmt, ## args)
 
 /* resources required to process stream */
-enum {
+enum NUM_BUFS_PER_STREAM {
        RES_BUF = 0,
        CMD_BUF,
        HASH_CTX_BUF,
@@ -88,7 +88,7 @@ enum {
        OUT_DATA_BUF,
        HISTORY_DATA_BUF,
        MAX_BUFS_PER_STREAM
-} NUM_BUFS_PER_STREAM;
+};
 
 struct zip_stream;
 struct zipvf_qp;
@@ -106,7 +106,7 @@ struct zip_stream {
        comp_func_t func;
        /* function to process comp operation */
        void *bufs[MAX_BUFS_PER_STREAM];
-} _rte_cache_aligned;
+} __rte_cache_aligned;
 
 
 /**
index c5e891c..a273d4c 100644 (file)
@@ -455,7 +455,6 @@ ssovf_eth_rx_adapter_queue_del(const struct rte_eventdev *dev,
        const struct octeontx_nic *nic = eth_dev->data->dev_private;
        pki_del_qos_t pki_qos;
        RTE_SET_USED(dev);
-       RTE_SET_USED(rx_queue_id);
 
        ret = strncmp(eth_dev->data->name, "eth_octeontx", 12);
        if (ret)
@@ -467,7 +466,7 @@ ssovf_eth_rx_adapter_queue_del(const struct rte_eventdev *dev,
        ret = octeontx_pki_port_delete_qos(nic->port_id, &pki_qos);
        if (ret < 0)
                ssovf_log_err("Failed to delete QOS port=%d, q=%d",
-                               nic->port_id, queue_conf->ev.queue_id);
+                               nic->port_id, rx_queue_id);
        return ret;
 }
 
index 1a129f4..996bb55 100644 (file)
@@ -1030,7 +1030,6 @@ static int enic_check_devargs(struct rte_eth_dev *dev)
        return 0;
 }
 
-struct enic *enicpmd_list_head = NULL;
 /* Initialize the driver
  * It returns 0 on success.
  */
index 870ac8c..71d008c 100644 (file)
@@ -1125,7 +1125,6 @@ rxa_poll(struct rte_event_eth_rx_adapter *rx_adapter)
        wrr_pos = rx_adapter->wrr_pos;
        max_nb_rx = rx_adapter->max_nb_rx;
        buf = &rx_adapter->event_enqueue_buffer;
-       stats = &rx_adapter->stats;
 
        /* Iterate through a WRR sequence */
        for (num_queue = 0; num_queue < rx_adapter->wrr_len; num_queue++) {
index 792fb3a..aa6e52c 100644 (file)
@@ -467,7 +467,7 @@ typedef int (*eventdev_eth_rx_adapter_caps_get_t)
                                        const struct rte_eth_dev *eth_dev,
                                        uint32_t *caps);
 
-struct rte_event_eth_rx_adapter_queue_conf *queue_conf;
+struct rte_event_eth_rx_adapter_queue_conf;
 
 /**
  * Retrieve the event device's timer adapter capabilities, as well as the ops
@@ -592,7 +592,7 @@ typedef int (*eventdev_eth_rx_adapter_stop_t)
                                        (const struct rte_eventdev *dev,
                                        const struct rte_eth_dev *eth_dev);
 
-struct rte_event_eth_rx_adapter_stats *stats;
+struct rte_event_eth_rx_adapter_stats;
 
 /**
  * Retrieve ethernet Rx adapter statistics.