Commit d8096b2d authored by Justin Hibbits's avatar Justin Hibbits
Browse files

Mechanically convert iavf(4) to IfAPI

Reviewed by:	erj
Sponsored by:	Juniper Networks, Inc.
Differential Revision: https://reviews.freebsd.org/D37858
parent 86803260
......@@ -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;
......
......@@ -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;
......
......@@ -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);
......
......@@ -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);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment