* Negotiate mailbox API version with the PF. * After reset API version is always set to the basic one (txgbe_mbox_api_10). * Then we try to negotiate starting with the most recent one. * If all negotiation attempts fail, then we will proceed with * the default one (txgbe_mbox_api_10). */
| 123 | * the default one (txgbe_mbox_api_10). |
| 124 | */ |
| 125 | static void |
| 126 | txgbevf_negotiate_api(struct txgbe_hw *hw) |
| 127 | { |
| 128 | int32_t i; |
| 129 | |
| 130 | /* start with highest supported, proceed down */ |
| 131 | static const int sup_ver[] = { |
| 132 | txgbe_mbox_api_13, |
| 133 | txgbe_mbox_api_12, |
| 134 | txgbe_mbox_api_11, |
| 135 | txgbe_mbox_api_10, |
| 136 | }; |
| 137 | |
| 138 | for (i = 0; i < ARRAY_SIZE(sup_ver); i++) { |
| 139 | if (txgbevf_negotiate_api_version(hw, sup_ver[i]) == 0) |
| 140 | break; |
| 141 | } |
| 142 | } |
| 143 | |
| 144 | static void |
| 145 | generate_random_mac_addr(struct rte_ether_addr *mac_addr) |
no test coverage detected