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

Function memif_msg_enq_init

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

Source from the content-addressed store, hash-verified

398}
399
400static int
401memif_msg_enq_init(struct rte_eth_dev *dev)
402{
403 struct pmd_internals *pmd = dev->data->dev_private;
404 struct memif_msg_queue_elt *e = memif_msg_enq(pmd->cc);
405 memif_msg_init_t *i;
406
407 if (e == NULL)
408 return -1;
409 i = &e->msg.init;
410 e->msg.type = MEMIF_MSG_TYPE_INIT;
411 i->version = MEMIF_VERSION;
412 i->id = pmd->id;
413 i->mode = MEMIF_INTERFACE_MODE_ETHERNET;
414
415 strlcpy((char *)i->name, rte_version(), sizeof(i->name));
416
417 if (*pmd->secret != '\0')
418 strlcpy((char *)i->secret, pmd->secret, sizeof(i->secret));
419
420 return 0;
421}
422
423static int
424memif_msg_enq_add_region(struct rte_eth_dev *dev, uint8_t idx)

Callers 1

memif_msg_receiveFunction · 0.85

Calls 3

memif_msg_enqFunction · 0.85
rte_versionFunction · 0.85
strlcpyFunction · 0.50

Tested by

no test coverage detected