MCPcopy Create free account
hub / github.com/F-Stack/f-stack / find_internal_resource

Function find_internal_resource

dpdk/drivers/net/vhost/rte_eth_vhost.c:521–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519}
520
521static inline struct internal_list *
522find_internal_resource(char *ifname)
523{
524 int found = 0;
525 struct internal_list *list;
526 struct pmd_internal *internal;
527
528 if (ifname == NULL)
529 return NULL;
530
531 pthread_mutex_lock(&internal_list_lock);
532
533 TAILQ_FOREACH(list, &internal_list, next) {
534 internal = list->eth_dev->data->dev_private;
535 if (!strcmp(internal->iface_name, ifname)) {
536 found = 1;
537 break;
538 }
539 }
540
541 pthread_mutex_unlock(&internal_list_lock);
542
543 if (!found)
544 return NULL;
545
546 return list;
547}
548
549static void
550eth_vhost_update_intr(struct rte_eth_dev *eth_dev, uint16_t rxq_idx)

Callers 5

new_deviceFunction · 0.70
destroy_deviceFunction · 0.70
vring_state_changedFunction · 0.70
vhost_driver_setupFunction · 0.70
eth_dev_closeFunction · 0.70

Calls 3

pthread_mutex_lockFunction · 0.85
strcmpFunction · 0.85
pthread_mutex_unlockFunction · 0.85

Tested by

no test coverage detected