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

Function ngbe_vf_set_mac_addr

dpdk/drivers/net/ngbe/ngbe_pf.c:361–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361static int
362ngbe_vf_set_mac_addr(struct rte_eth_dev *eth_dev,
363 uint32_t vf, uint32_t *msgbuf)
364{
365 struct ngbe_hw *hw = ngbe_dev_hw(eth_dev);
366 struct ngbe_vf_info *vfinfo = *(NGBE_DEV_VFDATA(eth_dev));
367 int rar_entry = hw->mac.num_rar_entries - (vf + 1);
368 uint8_t *new_mac = (uint8_t *)(&msgbuf[1]);
369 struct rte_ether_addr *ea = (struct rte_ether_addr *)new_mac;
370
371 if (rte_is_valid_assigned_ether_addr(ea)) {
372 rte_memcpy(vfinfo[vf].vf_mac_addresses, new_mac, 6);
373 return hw->mac.set_rar(hw, rar_entry, new_mac, vf, true);
374 }
375 return -1;
376}
377
378static int
379ngbe_vf_set_multicast(struct rte_eth_dev *eth_dev,

Callers 1

ngbe_rcv_msg_from_vfFunction · 0.85

Calls 3

ngbe_dev_hwFunction · 0.85
rte_memcpyFunction · 0.50

Tested by

no test coverage detected