| 128 | } |
| 129 | |
| 130 | int |
| 131 | rte_ethtool_get_eeprom(uint16_t port_id, struct ethtool_eeprom *eeprom, |
| 132 | void *words) |
| 133 | { |
| 134 | struct rte_dev_eeprom_info eeprom_info; |
| 135 | int status; |
| 136 | |
| 137 | if (eeprom == NULL || words == NULL) |
| 138 | return -EINVAL; |
| 139 | |
| 140 | eeprom_info.offset = eeprom->offset; |
| 141 | eeprom_info.length = eeprom->len; |
| 142 | eeprom_info.data = words; |
| 143 | |
| 144 | status = rte_eth_dev_get_eeprom(port_id, &eeprom_info); |
| 145 | if (status) |
| 146 | return status; |
| 147 | |
| 148 | eeprom->magic = eeprom_info.magic; |
| 149 | |
| 150 | return 0; |
| 151 | } |
| 152 | |
| 153 | int |
| 154 | rte_ethtool_set_eeprom(uint16_t port_id, struct ethtool_eeprom *eeprom, |
no test coverage detected