From nobody Tue Dec 14 14:39:14 2021 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 0682418F167B; Tue, 14 Dec 2021 14:39:15 +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 4JD1Gp5CVBz4sj4; Tue, 14 Dec 2021 14:39:14 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 929491BB8; Tue, 14 Dec 2021 14:39:14 +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 1BEEdEOi021002; Tue, 14 Dec 2021 14:39:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BEEdEhx021001; Tue, 14 Dec 2021 14:39:14 GMT (envelope-from git) Date: Tue, 14 Dec 2021 14:39:14 GMT Message-Id: <202112141439.1BEEdEhx021001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 88646c4e5f92 - main - virtio: plug some of set-but-not-used vars 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: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 88646c4e5f9224748939727eb973622714b924cc Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639492754; 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=QpIWz3rM4Iiq3SK7XqUK7Div/YATo73uXOAzWCqBc6g=; b=qDsR55fFm6BOYPDbOou6c2WG1q1/uKfHdK/0eXQ18J4/4kbwD5/xAfaw408NNhFX7Nr/NM 8yY1eKP/jtV38Vwc8Z0TMTEx/jIR1gifpdR7DQvJwLKqbI9iZs17OlJEKwRogv7bFSLWS9 ojjBN+lmR66asmS1WxnKLKHZnIjQMkp1a6iq41uPgaBMrmQYd/VjbU3tPHGk0ZB6qoa+rF 36zu1g4IeeYzm6+Kmra/4fyRw7/UIJcMQqtGi3ThhNiSeGi96w1ScjYsrlivVYR0KDkIvy ti4UQSPNkBxvSh1UMFUy1tHlh2wtxo6iPQfoesmk8C3GNfqbXRb2Q1EUBRtk4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639492754; a=rsa-sha256; cv=none; b=dsbftSQOiUiUlPgwnJLJCISQx6X4pCdgV6WIGjddnvEl4401PtMYavFrVP8GAAf2/x7Lwa p4F2xS3nZqmX0b+itqlpEHhK0L11xHI09RWe/3qp3R94P8NyDGxCDvY3BgqKbdPpx5vn+9 CebXFalTYkf+ytjUr0/7gtjq/yMQzUgiPT/6kLwckCsdC4fJNYerWQmyGLOOQqHWm0mRAQ DdCZIEEn3IivLb3lyi1/Mugo535M/5L+UaDyopMBIPvkjQfTpkTv00+4MBxpbbVtsB7+ZS fxgtqZbQtOYGqbxXfWlm+VMuFgbd1zudkp0VP/iQQu2oncdPa5qBnO5FGJ1zRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=88646c4e5f9224748939727eb973622714b924cc commit 88646c4e5f9224748939727eb973622714b924cc Author: Mateusz Guzik AuthorDate: 2021-12-14 14:38:42 +0000 Commit: Mateusz Guzik CommitDate: 2021-12-14 14:38:42 +0000 virtio: plug some of set-but-not-used vars Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/dev/virtio/network/virtio_net.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/dev/virtio/network/virtio_net.h b/sys/dev/virtio/network/virtio_net.h index da5aea4a29e6..412352a35bf3 100644 --- a/sys/dev/virtio/network/virtio_net.h +++ b/sys/dev/virtio/network/virtio_net.h @@ -413,16 +413,22 @@ static inline int virtio_net_tx_offload_ctx(struct mbuf *m, int *etype, int *proto, int *start) { struct ether_vlan_header *evh; +#if defined(INET) || defined(INET6) int offset; +#endif evh = mtod(m, struct ether_vlan_header *); 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) {