Mechanically convert iavf(4) to IfAPI

Reviewed by:	erj
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37858
This commit is contained in:
Justin Hibbits 2022-08-19 11:55:36 -04:00
parent 8680326022
commit d8096b2df2
4 changed files with 9 additions and 9 deletions

View File

@ -238,7 +238,7 @@ struct iavf_rx_queue {
struct iavf_vsi {
if_ctx_t ctx;
if_softc_ctx_t shared;
struct ifnet *ifp;
if_t ifp;
struct iavf_sc *back;
device_t dev;
struct iavf_hw *hw;

View File

@ -968,7 +968,7 @@ iavf_media_status_common(struct iavf_sc *sc, struct ifmediareq *ifmr)
* @returns ENODEV because changing the media and speed is not supported.
*/
int
iavf_media_change_common(struct ifnet *ifp)
iavf_media_change_common(if_t ifp)
{
if_printf(ifp, "Changing speed is not supported\n");
@ -984,7 +984,7 @@ iavf_media_change_common(struct ifnet *ifp)
* reports speed to us over the virtchnl interface.
*/
void
iavf_set_initial_baudrate(struct ifnet *ifp)
iavf_set_initial_baudrate(if_t ifp)
{
#if __FreeBSD_version >= 1100000
if_setbaudrate(ifp, IF_Gbps(40));
@ -1210,7 +1210,7 @@ iavf_config_rss(struct iavf_sc *sc)
int
iavf_config_promisc(struct iavf_sc *sc, int flags)
{
struct ifnet *ifp = sc->vsi.ifp;
if_t ifp = sc->vsi.ifp;
sc->promisc_flags = 0;

View File

@ -487,8 +487,8 @@ void iavf_add_sysctls_eth_stats(struct sysctl_ctx_list *ctx,
struct sysctl_oid_list *child, struct iavf_eth_stats *eth_stats);
void iavf_media_status_common(struct iavf_sc *sc,
struct ifmediareq *ifmr);
int iavf_media_change_common(struct ifnet *ifp);
void iavf_set_initial_baudrate(struct ifnet *ifp);
int iavf_media_change_common(if_t ifp);
void iavf_set_initial_baudrate(if_t ifp);
u64 iavf_max_vc_speed_to_value(u8 link_speeds);
void iavf_config_rss_reg(struct iavf_sc *sc);
void iavf_config_rss_pf(struct iavf_sc *sc);

View File

@ -761,7 +761,7 @@ iavf_if_init(if_ctx_t ctx)
/* Make sure queues are disabled */
iavf_disable_queues_with_retries(sc);
bcopy(IF_LLADDR(ifp), tmpaddr, ETHER_ADDR_LEN);
bcopy(if_getlladdr(ifp), tmpaddr, ETHER_ADDR_LEN);
if (!cmp_etheraddr(hw->mac.addr, tmpaddr) &&
(iavf_validate_mac_addr(tmpaddr) == IAVF_SUCCESS)) {
error = iavf_del_mac_filter(sc, hw->mac.addr);
@ -1540,12 +1540,12 @@ iavf_setup_interface(struct iavf_sc *sc)
{
struct iavf_vsi *vsi = &sc->vsi;
if_ctx_t ctx = vsi->ctx;
struct ifnet *ifp = iflib_get_ifp(ctx);
if_t ifp = iflib_get_ifp(ctx);
iavf_dbg_init(sc, "begin\n");
vsi->shared->isc_max_frame_size =
ifp->if_mtu + ETHER_HDR_LEN + ETHER_CRC_LEN
if_getmtu(ifp) + ETHER_HDR_LEN + ETHER_CRC_LEN
+ ETHER_VLAN_ENCAP_LEN;
iavf_set_initial_baudrate(ifp);