From nobody Wed Apr 13 23:09:31 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 5D7BA1B40A51; Wed, 13 Apr 2022 23:09:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KdywC4LmNz4lnw; Wed, 13 Apr 2022 23:09:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649891371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UWNgQQpBVuWKlfFn6tJc63rFJPeYvERf2vDtCiUUg3o=; b=W5maSiTwu1uoA41wVaJGZI6iF/0StjjQwVKJWNj12+M/QCTrkUH5IRa96/gmfdsu4qoY6X 9GJm+7uBu/w5HzXYG3Hk1DaXfC7N6l0YuIVNkpy5PpgP2o1vuEe7ksQpb2OZccvhFSp9LX 9FUsLm7M2PQM08n75YLzlP6Qt2I/tmKoarIu5yRxBc6B7Xghrj/JjewQUUNcz12r89L3Am bR9OmLrV8chTnNLn6BWMYFZ8St5uZMjwnLLHXq67pz6nJxezkQZuOa83ORbbNhKe7A6kGq ysAYJKPJClrZ2+BQzmldpQcAtQZkXj282mtqMHUIgJqKAqZKXRg16RO7iTNlBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5A40615400; Wed, 13 Apr 2022 23:09:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23DN9V4H074487; Wed, 13 Apr 2022 23:09:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23DN9VLh074486; Wed, 13 Apr 2022 23:09:31 GMT (envelope-from git) Date: Wed, 13 Apr 2022 23:09:31 GMT Message-Id: <202204132309.23DN9VLh074486@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 127b40e7dcdb - main - vtnet: offset is only used for INET or INET6. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 127b40e7dcdbd5cc1ffc189b59bb8f8531716f76 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649891371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UWNgQQpBVuWKlfFn6tJc63rFJPeYvERf2vDtCiUUg3o=; b=kmMVjuM+NHuft9BjCUZ0CupZdOaEMayO4utRpe0zIUXke5vN+438ZBZV58IXw2YZY0+paN n4EFzYxMRxiB+zAp9S48juEC74hVVCZXn6gg/Al0K5qMzz9hwLdM0gj5NWOKunogfG2ayX HoRJ9Db/sRtSREdRuI+7cQ6IdccmA7HUz9Z3cQxTet8k2siiMRYBtfPUOBbLuNOt2413WZ y5rp7b+l7l7AJHNv2I4z7HxMfk13FVhgkd0ubV5EyDIb+BowMR36q0+9k9aOq08k9uHAym DhFfCAlJl4yPSmoA6wER4agsccMGmrTCOKYsE5xy4EEUAE8b+0Nezc7fuEBq1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649891371; a=rsa-sha256; cv=none; b=EzBo0Gzycv7LuSaXdrXk2GG12GOa/OnkZ2Lkd9EZHXjvVU4kCZ+kMRHezG+HYcxdEpQx5K caGzV07mYJOdiAFVdvT/N0mIcBvu8frquLgoUwk32YTUaskPnAfC4/iJxPFGsfE8HLoESt VqdQumKLl+NDh+pcBruxJpTZBYqilbXPM0Eum7U96eKLWcS3kH/oyG++eha0bu6QHTdMfX KqB+5s/BoJWPac4GEU7kTkTLduRsTmzu+Fh0SSJsZCbDzNEpVMuw2J5jkIu+g2Ndw7kSdN hfiENSdWgKMg68VehNFst5lTB4A4bKym4JT9XleffH/+8grzOEou+7xisrE7Ug== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=127b40e7dcdbd5cc1ffc189b59bb8f8531716f76 commit 127b40e7dcdbd5cc1ffc189b59bb8f8531716f76 Author: John Baldwin AuthorDate: 2022-04-13 23:08:21 +0000 Commit: John Baldwin CommitDate: 2022-04-13 23:08:21 +0000 vtnet: offset is only used for INET or INET6. --- sys/dev/virtio/network/if_vtnet.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c index 0a020e6b6c91..bb659b7b2ef5 100644 --- a/sys/dev/virtio/network/if_vtnet.c +++ b/sys/dev/virtio/network/if_vtnet.c @@ -2359,7 +2359,9 @@ vtnet_txq_offload_ctx(struct vtnet_txq *txq, struct mbuf *m, int *etype, { struct vtnet_softc *sc; struct ether_vlan_header *evh; +#if defined(INET) || defined(INET6) int offset; +#endif sc = txq->vtntx_sc; @@ -2367,10 +2369,14 @@ vtnet_txq_offload_ctx(struct vtnet_txq *txq, struct mbuf *m, int *etype, if (evh->evl_encap_proto == htons(ETHERTYPE_VLAN)) { /* BMV: We should handle nested VLAN tags too. */ *etype = ntohs(evh->evl_proto); +#if defined(INET) || defined(INET6) offset = sizeof(struct ether_vlan_header); +#endif } else { *etype = ntohs(evh->evl_encap_proto); +#if defined(INET) || defined(INET6) offset = sizeof(struct ether_header); +#endif } switch (*etype) {