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

Function ngbe_write_mbx

dpdk/drivers/net/ngbe/base/ngbe_mbx.c:43–56  ·  view source on GitHub ↗

* ngbe_write_mbx - Write a message to the mailbox * @hw: pointer to the HW structure * @msg: The message buffer * @size: Length of buffer * @mbx_id: id of mailbox to write * * returns 0 if it successfully copied message into the buffer **/

Source from the content-addressed store, hash-verified

41 * returns 0 if it successfully copied message into the buffer
42 **/
43s32 ngbe_write_mbx(struct ngbe_hw *hw, u32 *msg, u16 size, u16 mbx_id)
44{
45 struct ngbe_mbx_info *mbx = &hw->mbx;
46 s32 ret_val = 0;
47
48 if (size > mbx->size) {
49 ret_val = NGBE_ERR_MBX;
50 DEBUGOUT("Invalid mailbox message size %d", size);
51 } else if (mbx->write) {
52 ret_val = mbx->write(hw, msg, size, mbx_id);
53 }
54
55 return ret_val;
56}
57
58/**
59 * ngbe_check_for_msg - checks to see if someone sent us mail

Callers 3

ngbe_vf_resetFunction · 0.85
ngbe_rcv_msg_from_vfFunction · 0.85
ngbe_rcv_ack_from_vfFunction · 0.85

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected