net/enic: generate VXLAN src port if it is zero in template
[dpdk.git] / drivers / net / dpaa / dpaa_ethdev.c
index 0ce2f5a..8a6b19b 100644 (file)
@@ -335,7 +335,7 @@ static void dpaa_interrupt_handler(void *param)
        if (bytes_read < 0)
                DPAA_PMD_ERR("Error reading eventfd\n");
        dpaa_eth_link_update(dev, 0);
-       _rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
+       rte_eth_dev_callback_process(dev, RTE_ETH_EVENT_INTR_LSC, NULL);
 }
 
 static int dpaa_eth_dev_start(struct rte_eth_dev *dev)
@@ -1303,6 +1303,41 @@ dpaa_dev_set_mac_addr(struct rte_eth_dev *dev,
        return ret;
 }
 
+static int
+dpaa_dev_rss_hash_update(struct rte_eth_dev *dev,
+                        struct rte_eth_rss_conf *rss_conf)
+{
+       struct rte_eth_dev_data *data = dev->data;
+       struct rte_eth_conf *eth_conf = &data->dev_conf;
+
+       PMD_INIT_FUNC_TRACE();
+
+       if (!(default_q || fmc_q)) {
+               if (dpaa_fm_config(dev, rss_conf->rss_hf)) {
+                       DPAA_PMD_ERR("FM port configuration: Failed\n");
+                       return -1;
+               }
+               eth_conf->rx_adv_conf.rss_conf.rss_hf = rss_conf->rss_hf;
+       } else {
+               DPAA_PMD_ERR("Function not supported\n");
+               return -ENOTSUP;
+       }
+       return 0;
+}
+
+static int
+dpaa_dev_rss_hash_conf_get(struct rte_eth_dev *dev,
+                          struct rte_eth_rss_conf *rss_conf)
+{
+       struct rte_eth_dev_data *data = dev->data;
+       struct rte_eth_conf *eth_conf = &data->dev_conf;
+
+       /* dpaa does not support rss_key, so length should be 0*/
+       rss_conf->rss_key_len = 0;
+       rss_conf->rss_hf = eth_conf->rx_adv_conf.rss_conf.rss_hf;
+       return 0;
+}
+
 static int dpaa_dev_queue_intr_enable(struct rte_eth_dev *dev,
                                      uint16_t queue_id)
 {
@@ -1386,7 +1421,6 @@ static struct eth_dev_ops dpaa_devops = {
        .tx_queue_setup           = dpaa_eth_tx_queue_setup,
        .rx_queue_release         = dpaa_eth_rx_queue_release,
        .tx_queue_release         = dpaa_eth_tx_queue_release,
-       .rx_queue_count           = dpaa_dev_rx_queue_count,
        .rx_burst_mode_get        = dpaa_dev_rx_burst_mode_get,
        .tx_burst_mode_get        = dpaa_dev_tx_burst_mode_get,
        .rxq_info_get             = dpaa_rxq_info_get,
@@ -1418,6 +1452,8 @@ static struct eth_dev_ops dpaa_devops = {
 
        .rx_queue_intr_enable     = dpaa_dev_queue_intr_enable,
        .rx_queue_intr_disable    = dpaa_dev_queue_intr_disable,
+       .rss_hash_update          = dpaa_dev_rss_hash_update,
+       .rss_hash_conf_get        = dpaa_dev_rss_hash_conf_get,
 };
 
 static bool
@@ -1437,7 +1473,7 @@ is_dpaa_supported(struct rte_eth_dev *dev)
 }
 
 int
-rte_pmd_dpaa_set_tx_loopback(uint8_t port, uint8_t on)
+rte_pmd_dpaa_set_tx_loopback(uint16_t port, uint8_t on)
 {
        struct rte_eth_dev *dev;
 
@@ -1880,6 +1916,7 @@ dpaa_dev_init(struct rte_eth_dev *eth_dev)
 
        /* Populate ethdev structure */
        eth_dev->dev_ops = &dpaa_devops;
+       eth_dev->rx_queue_count = dpaa_dev_rx_queue_count;
        eth_dev->rx_pkt_burst = dpaa_eth_queue_rx;
        eth_dev->tx_pkt_burst = dpaa_eth_tx_drop_all;