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

Function ixgbevf_update_xcast_mode

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

* ixgbevf_update_xcast_mode - Update Multicast mode * @hw: pointer to the HW structure * @xcast_mode: new multicast mode * * Updates the Multicast Mode of VF. **/

Source from the content-addressed store, hash-verified

394 * Updates the Multicast Mode of VF.
395 **/
396s32 ixgbevf_update_xcast_mode(struct ixgbe_hw *hw, int xcast_mode)
397{
398 u32 msgbuf[2];
399 s32 err;
400
401 switch (hw->api_version) {
402 case ixgbe_mbox_api_12:
403 /* New modes were introduced in 1.3 version */
404 if (xcast_mode > IXGBEVF_XCAST_MODE_ALLMULTI)
405 return IXGBE_ERR_FEATURE_NOT_SUPPORTED;
406 /* Fall through */
407 case ixgbe_mbox_api_13:
408 break;
409 default:
410 return IXGBE_ERR_FEATURE_NOT_SUPPORTED;
411 }
412
413 msgbuf[0] = IXGBE_VF_UPDATE_XCAST_MODE;
414 msgbuf[1] = xcast_mode;
415
416 err = ixgbevf_write_msg_read_ack(hw, msgbuf, msgbuf, 2);
417 if (err)
418 return err;
419
420 msgbuf[0] &= ~IXGBE_VT_MSGTYPE_CTS;
421 if (msgbuf[0] == (IXGBE_VF_UPDATE_XCAST_MODE | IXGBE_VT_MSGTYPE_NACK))
422 return IXGBE_ERR_FEATURE_NOT_SUPPORTED;
423 return IXGBE_SUCCESS;
424}
425
426/**
427 * ixgbe_set_vfta_vf - Set/Unset vlan filter table address

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected