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

Function memif_msg_enq_add_region

dpdk/drivers/net/memif/memif_socket.c:423–442  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421}
422
423static int
424memif_msg_enq_add_region(struct rte_eth_dev *dev, uint8_t idx)
425{
426 struct pmd_internals *pmd = dev->data->dev_private;
427 struct pmd_process_private *proc_private = dev->process_private;
428 struct memif_msg_queue_elt *e = memif_msg_enq(pmd->cc);
429 memif_msg_add_region_t *ar;
430 struct memif_region *mr = proc_private->regions[idx];
431
432 if (e == NULL)
433 return -1;
434
435 ar = &e->msg.add_region;
436 e->msg.type = MEMIF_MSG_TYPE_ADD_REGION;
437 e->fd = mr->fd;
438 ar->index = idx;
439 ar->size = mr->region_size;
440
441 return 0;
442}
443
444static int
445memif_msg_enq_add_ring(struct rte_eth_dev *dev, uint8_t idx,

Callers 1

memif_msg_receiveFunction · 0.85

Calls 1

memif_msg_enqFunction · 0.85

Tested by

no test coverage detected