From nobody Sun Nov 28 18:24:23 2021 X-Original-To: bugs@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 9825118BC940 for ; Sun, 28 Nov 2021 18:24:23 +0000 (UTC) (envelope-from bugzilla-noreply@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 4J2H1z3BXDz4sjJ for ; Sun, 28 Nov 2021 18:24:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4DE571409C for ; Sun, 28 Nov 2021 18:24:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 1ASIONUN070881 for ; Sun, 28 Nov 2021 18:24:23 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 1ASION9B070880 for bugs@FreeBSD.org; Sun, 28 Nov 2021 18:24:23 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 260068] e1000 & igb in netmap mode removes VLAN headers Date: Sun, 28 Nov 2021 18:24:23 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: vmaffione@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638123863; 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: in-reply-to:in-reply-to:references:references; bh=u3LiF5D0Iy6KHm/8h+ydyZ679a0VC7j73HmTsuXupbI=; b=EHVCD00nuDiVfvUZ8hRybNi0HVS8JuSZJZLxXSudvnm6SMhUeRo0ZAzst/0VCG0qoRXaQ3 HeqISjr2IjhpSkejks1cbKclmfgVWISafUHExaoIXCW5rklzBwp7PecwhhaQ72LRLX4RU0 kDiUWB8ZbMGeicQhfIrGx/OLbm9GaaNquPjoQsoWbnNs8DSKON+4hTkPPQzhZLpK31AZnL g547sm+F/Yam+zOmDPWD9JFn+5cADIBUqGNiEweOhBYlrxxHp8wH5XPp8JrASj03voEn2+ hvjdsWc5dbMQuhYq0kMJDNHU4SE/RQYyS9j1FzUJqXNEow1mpmUF4/T19HAPdw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638123863; a=rsa-sha256; cv=none; b=CvQB3jcN7ighrROLPwAnrLrWqXIwanwpAHGvBFIqZWnL5OYnxX/pyKI0s6gr76lgeyWn2l Au23xliIKLJR070okdCYDuxATT0XcFsHAjjRjqoP1dOElHfWoRrlFXgTPbVpUK2HASLtTF Bm6MOaeYCi07y5ocCV1q/NXc4vBfuOaq/iE9BLjKDxnpggevWH7rty9YF+6IkJ1RLpLWcJ lSTNlN38YTwXljOoJrGB90sVtdBdoXwjzGauTMIdybk1t/ojZbZ1/U75cQ+VA/p8EzLqEh XI1ChVYYyKsSPsWEmlOBNOLCJN5dzVhwcF/WvIrP6rBvMloYZlG2K34fpE4Rag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D260068 Vincenzo Maffione changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |In Progress --- Comment #4 from Vincenzo Maffione --- I think that after the latest changes, the e1000 drivers (em, lem, igb) are looking at the wrong "capability" bitmaps, and therefore they are basically ignoring your ifconfig commands to disable capabilities (vlanhwtag, rxcsum, ...). In particular, VLAN hw stripping is always done by the device, even if you disable it. This explains why you don't see the VLAN header when using netmap. In the non-netmap case, the stripped VLAN information gets stored in the mbuf metadata, so that the kernel is able to insert that back when passing the packet to tcpdump. In the netmap case, the stripped VLAN information is los= t, because netmap has no space for that kind of metadata. The patch I attached fixes the e1000 drivers so that device capabilities are actually used to configure the device accordingly (i.e., VLAN stripping is disabled in the hardware). The patch also does some cleanup to make the e10= 00 drivers more uniform w.r.t. VLAN/CSUM offload processing. Could you please test the patch for em and igb? The patch is meant for Free= BSD HEAD. --=20 You are receiving this mail because: You are the assignee for the bug.=