Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
51 lines
1.7 KiB
Diff
51 lines
1.7 KiB
Diff
diff --git a/platform/linux-dpdk/odp_packet_dpdk.c b/platform/linux-dpdk/odp_packet_dpdk.c
|
|
index cd95ba0f9..7e8b7e3f1 100644
|
|
--- a/platform/linux-dpdk/odp_packet_dpdk.c
|
|
+++ b/platform/linux-dpdk/odp_packet_dpdk.c
|
|
@@ -372,13 +372,18 @@ static void prepare_rss_conf(pktio_entry_t *pktio_entry,
|
|
uint64_t rss_hf_capa;
|
|
pkt_dpdk_t *pkt_dpdk = pkt_priv(pktio_entry);
|
|
uint16_t port_id = pkt_dpdk->port_id;
|
|
+ int ret;
|
|
|
|
memset(&pkt_dpdk->rss_conf, 0, sizeof(struct rte_eth_rss_conf));
|
|
|
|
if (!p->hash_enable)
|
|
return;
|
|
|
|
- rte_eth_dev_info_get(port_id, &dev_info);
|
|
+ ret = rte_eth_dev_info_get(port_id, &dev_info);
|
|
+ if (ret) {
|
|
+ _ODP_ERR("Failed to read device info: %d\n", ret);
|
|
+ return;
|
|
+ }
|
|
rss_hf_capa = dev_info.flow_type_rss_offloads;
|
|
|
|
/* Print debug info about unsupported hash protocols */
|
|
@@ -842,7 +847,11 @@ static int dpdk_start(pktio_entry_t *pktio_entry)
|
|
pktio_entry->state == PKTIO_STATE_STOP_PENDING)
|
|
rte_eth_dev_stop(pkt_dpdk->port_id);
|
|
|
|
- rte_eth_dev_info_get(port_id, &dev_info);
|
|
+ ret = rte_eth_dev_info_get(port_id, &dev_info);
|
|
+ if (ret) {
|
|
+ _ODP_ERR("Failed to read device info: %d\n", ret);
|
|
+ return -1;
|
|
+ }
|
|
|
|
/* Pcap driver reconfiguration may fail if number of rx/tx queues is set to zero */
|
|
if (!strncmp(dev_info.driver_name, PCAP_DRV_NAME, strlen(PCAP_DRV_NAME))) {
|
|
@@ -1258,7 +1267,11 @@ static uint32_t _dpdk_vdev_mtu(uint16_t port_id)
|
|
int ret;
|
|
int sockfd;
|
|
|
|
- rte_eth_dev_info_get(port_id, &dev_info);
|
|
+ ret = rte_eth_dev_info_get(port_id, &dev_info);
|
|
+ if (ret) {
|
|
+ _ODP_ERR("Failed to read device info: %d\n", ret);
|
|
+ return 0;
|
|
+ }
|
|
if_indextoname(dev_info.if_index, ifr.ifr_name);
|
|
sockfd = socket(AF_INET, SOCK_DGRAM, 0);
|
|
ret = ioctl(sockfd, SIOCGIFMTU, &ifr);
|