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

Function ixgbevf_negotiate_api_version

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

* ixgbevf_negotiate_api_version - Negotiate supported API version * @hw: pointer to the HW structure * @api: integer containing requested API version **/

Source from the content-addressed store, hash-verified

668 * @api: integer containing requested API version
669 **/
670int ixgbevf_negotiate_api_version(struct ixgbe_hw *hw, int api)
671{
672 int err;
673 u32 msg[3];
674
675 /* Negotiate the mailbox API version */
676 msg[0] = IXGBE_VF_API_NEGOTIATE;
677 msg[1] = api;
678 msg[2] = 0;
679
680 err = ixgbevf_write_msg_read_ack(hw, msg, msg, 3);
681 if (!err) {
682 msg[0] &= ~IXGBE_VT_MSGTYPE_CTS;
683
684 /* Store value and return 0 on success */
685 if (msg[0] == (IXGBE_VF_API_NEGOTIATE | IXGBE_VT_MSGTYPE_ACK)) {
686 hw->api_version = api;
687 return 0;
688 }
689
690 err = IXGBE_ERR_INVALID_ARGUMENT;
691 }
692
693 return err;
694}
695
696int ixgbevf_get_queues(struct ixgbe_hw *hw, unsigned int *num_tcs,
697 unsigned int *default_tc)

Callers 1

ixgbevf_negotiate_apiFunction · 0.85

Calls 1

Tested by

no test coverage detected