ethdev: promote sibling iterators to stable
[dpdk.git] / drivers / net / dpaa2 / base / dpaa2_hw_dpni.c
index 9d15653..641e702 100644 (file)
@@ -41,6 +41,17 @@ rte_pmd_dpaa2_set_custom_hash(uint16_t port_id,
        void *p_params;
        int ret, tc_index = 0;
 
+       if (!rte_eth_dev_is_valid_port(port_id)) {
+               DPAA2_PMD_WARN("Invalid port id %u", port_id);
+               return -EINVAL;
+       }
+
+       if (strcmp(eth_dev->device->driver->name,
+                       RTE_STR(NET_DPAA2_PMD_DRIVER_NAME))) {
+               DPAA2_PMD_WARN("Not a valid dpaa2 port");
+               return -EINVAL;
+       }
+
        p_params = rte_zmalloc(
                NULL, DIST_PARAM_IOVA_SIZE, RTE_CACHE_LINE_SIZE);
        if (!p_params) {
@@ -203,7 +214,7 @@ dpaa2_distset_to_dpkg_profile_cfg(
        memset(kg_cfg, 0, sizeof(struct dpkg_profile_cfg));
        while (req_dist_set) {
                if (req_dist_set % 2 != 0) {
-                       dist_field = 1U << loop;
+                       dist_field = 1ULL << loop;
                        switch (dist_field) {
                        case ETH_RSS_L2_PAYLOAD: