From owner-freebsd-net@freebsd.org Tue Jan 7 12:50:49 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8E8091DD845 for ; Tue, 7 Jan 2020 12:50:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 47sXL13LFlz45s5 for ; Tue, 7 Jan 2020 12:50:49 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 70AA21DD844; Tue, 7 Jan 2020 12:50:49 +0000 (UTC) Delivered-To: net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6F5561DD842 for ; Tue, 7 Jan 2020 12:50:49 +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) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47sXL12Bdbz45s3 for ; Tue, 7 Jan 2020 12:50:49 +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.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 2D5ED2716C for ; Tue, 7 Jan 2020 12:50:49 +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 007ConFn038370 for ; Tue, 7 Jan 2020 12:50:49 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 007ConVM038369 for net@FreeBSD.org; Tue, 7 Jan 2020 12:50:49 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: net@FreeBSD.org Subject: [Bug 243126] Assertion fl->ifl_cidx == cidx failed at /usr/src/sys/net/iflib.c:2531 Date: Tue, 07 Jan 2020 12:50:48 +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: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: avg@FreeBSD.org X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: net@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 MIME-Version: 1.0 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jan 2020 12:50:49 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D243126 Andriy Gapon changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Open --- Comment #3 from Andriy Gapon --- I wonder if irf_idx can "jump ahead" of ifl_cidx because of a skipped zero-length packet? Hmm, it seems like it could be the case. Given the current value of iri_cidx/ifr_cq_cidx, I examined three descripto= rs before that index: (kgdb) p $19.vxcr_u.rxcd[476] $21 =3D {rxd_idx =3D 142, pad1 =3D 0, eop =3D 1, sop =3D 1, qid =3D 0, rss_= type =3D 2, no_csum =3D 0, pad2 =3D 0, rss_hash =3D 600473664, len =3D 1514, error =3D = 0, vlan =3D 0, vtag =3D 0, csum =3D 0, csum_ok =3D 1, udp =3D 0, tcp =3D 1, ipcsum_ok =3D = 1, ipv6 =3D 0,=20 ipv4 =3D 1, fragment =3D 0, fcs =3D 0, type =3D 3, gen =3D 1} (kgdb) p $19.vxcr_u.rxcd[475] $22 =3D {rxd_idx =3D 141, pad1 =3D 0, eop =3D 1, sop =3D 1, qid =3D 0, rss_= type =3D 0, no_csum =3D 0, pad2 =3D 0, rss_hash =3D 0, len =3D 0, error =3D 0, vlan =3D= 0, vtag =3D 0, csum =3D 0, csum_ok =3D 0, udp =3D 0, tcp =3D 0, ipcsum_ok =3D 0, ipv6 =3D = 0, ipv4 =3D 0,=20 fragment =3D 0, fcs =3D 0, type =3D 3, gen =3D 1} (kgdb) p $19.vxcr_u.rxcd[474] $23 =3D {rxd_idx =3D 140, pad1 =3D 0, eop =3D 1, sop =3D 1, qid =3D 0, rss_= type =3D 2, no_csum =3D 0, pad2 =3D 0, rss_hash =3D 600473664, len =3D 66, error =3D 0,= vlan =3D 0, vtag =3D 0, csum =3D 0, csum_ok =3D 1, udp =3D 0, tcp =3D 1, ipcsum_ok =3D = 1, ipv6 =3D 0,=20 ipv4 =3D 1, fragment =3D 0, fcs =3D 0, type =3D 3, gen =3D 1} The descriptor at 476 with rxd_idx =3D 142 seems like the current packet. And the previous descriptor at 475 with rxd_idx =3D 141 is a zero-length pa= cket: eop =3D 1, sop =3D 1, len =3D 0. The packet before it is a normal packet again: eop =3D 1, sop =3D 1, len = =3D 66. Now, how to fix the problem? I see two ways: - a driver can notify iflib of a zero length packet (via a new callback), so that iflib can skip the corresponding entry in the appropriate free list - rxd_frag_to_sd() can skip through fl entries until ifl_cidx becomes equal= to irf_idx --=20 You are receiving this mail because: You are the assignee for the bug.=