As suggested by a comment in ixl_initialize_vsi(), use if_getcapenable(9)

instead of directly interrogating ifp->if_capenable.

Reviewed by:	erj (ixl_initialize_vsi())
Differential Revision:	https://reviews.freebsd.org/D15720 (part of)
This commit is contained in:
Marius Strobl 2018-07-15 18:02:50 +00:00
parent 2bd7c57051
commit 52a05efab9
2 changed files with 2 additions and 3 deletions

View File

@ -1219,8 +1219,7 @@ ixl_initialize_vsi(struct ixl_vsi *vsi)
/* Set VLAN receive stripping mode */
ctxt.info.valid_sections |= I40E_AQ_VSI_PROP_VLAN_VALID;
ctxt.info.port_vlan_flags = I40E_AQ_VSI_PVLAN_MODE_ALL;
// TODO: Call function to get this cap bit, instead
if (vsi->ifp->if_capenable & IFCAP_VLAN_HWTAGGING)
if (if_getcapenable(vsi->ifp) & IFCAP_VLAN_HWTAGGING)
ctxt.info.port_vlan_flags |= I40E_AQ_VSI_PVLAN_EMOD_STR_BOTH;
else
ctxt.info.port_vlan_flags |= I40E_AQ_VSI_PVLAN_EMOD_NOTHING;

View File

@ -687,7 +687,7 @@ ixl_isc_rxd_pkt_get(void *arg, if_rxd_info_t ri)
rxr->packets++;
rxr->rx_packets++;
if ((vsi->ifp->if_capenable & IFCAP_RXCSUM) != 0)
if ((if_getcapenable(vsi->ifp) & IFCAP_RXCSUM) != 0)
ixl_rx_checksum(ri, status, error, ptype);
ri->iri_flowid = le32toh(cur->wb.qword0.hi_dword.rss);
ri->iri_rsstype = ixl_ptype_to_hash(ptype);