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

Function ixgbe_set_rar_vf

dpdk/drivers/net/ixgbe/base/ixgbe_vf.c:315–338  ·  view source on GitHub ↗

* ixgbe_set_rar_vf - set device MAC address * @hw: pointer to hardware structure * @index: Receive address register to write * @addr: Address to put into receive address register * @vmdq: VMDq "set" or "pool" index * @enable_addr: set flag that address is active **/

Source from the content-addressed store, hash-verified

313 * @enable_addr: set flag that address is active
314 **/
315s32 ixgbe_set_rar_vf(struct ixgbe_hw *hw, u32 index, u8 *addr, u32 vmdq,
316 u32 enable_addr)
317{
318 u32 msgbuf[3];
319 u8 *msg_addr = (u8 *)(&msgbuf[1]);
320 s32 ret_val;
321 UNREFERENCED_3PARAMETER(vmdq, enable_addr, index);
322
323 memset(msgbuf, 0, 12);
324 msgbuf[0] = IXGBE_VF_SET_MAC_ADDR;
325 memcpy(msg_addr, addr, 6);
326 ret_val = ixgbevf_write_msg_read_ack(hw, msgbuf, msgbuf, 3);
327
328 msgbuf[0] &= ~IXGBE_VT_MSGTYPE_CTS;
329
330 /* if nacked the address was rejected, use "perm_addr" */
331 if (!ret_val &&
332 (msgbuf[0] == (IXGBE_VF_SET_MAC_ADDR | IXGBE_VT_MSGTYPE_NACK))) {
333 ixgbe_get_mac_addr_vf(hw, hw->mac.addr);
334 return IXGBE_ERR_MBX;
335 }
336
337 return ret_val;
338}
339
340/**
341 * ixgbe_update_mc_addr_list_vf - Update Multicast addresses

Callers 1

eth_ixgbevf_dev_initFunction · 0.85

Calls 4

memsetFunction · 0.85
ixgbe_get_mac_addr_vfFunction · 0.85
memcpyFunction · 0.50

Tested by

no test coverage detected