From owner-svn-src-all@freebsd.org Sun Jul 15 18:02:51 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C18181048FF5; Sun, 15 Jul 2018 18:02:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 70EFA90F1D; Sun, 15 Jul 2018 18:02:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 51E0211609; Sun, 15 Jul 2018 18:02:51 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6FI2pXY009649; Sun, 15 Jul 2018 18:02:51 GMT (envelope-from marius@FreeBSD.org) Received: (from marius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6FI2oUt009647; Sun, 15 Jul 2018 18:02:51 GMT (envelope-from marius@FreeBSD.org) Message-Id: <201807151802.w6FI2oUt009647@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: marius set sender to marius@FreeBSD.org using -f From: Marius Strobl Date: Sun, 15 Jul 2018 18:02:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r336309 - head/sys/dev/ixl X-SVN-Group: head X-SVN-Commit-Author: marius X-SVN-Commit-Paths: head/sys/dev/ixl X-SVN-Commit-Revision: 336309 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 15 Jul 2018 18:02:51 -0000 Author: marius Date: Sun Jul 15 18:02:50 2018 New Revision: 336309 URL: https://svnweb.freebsd.org/changeset/base/336309 Log: 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) Modified: head/sys/dev/ixl/ixl_pf_main.c head/sys/dev/ixl/ixl_txrx.c Modified: head/sys/dev/ixl/ixl_pf_main.c ============================================================================== --- head/sys/dev/ixl/ixl_pf_main.c Sun Jul 15 17:31:50 2018 (r336308) +++ head/sys/dev/ixl/ixl_pf_main.c Sun Jul 15 18:02:50 2018 (r336309) @@ -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; Modified: head/sys/dev/ixl/ixl_txrx.c ============================================================================== --- head/sys/dev/ixl/ixl_txrx.c Sun Jul 15 17:31:50 2018 (r336308) +++ head/sys/dev/ixl/ixl_txrx.c Sun Jul 15 18:02:50 2018 (r336309) @@ -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);