From owner-freebsd-net@freebsd.org Mon Dec 30 04:21:23 2019 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 693781D41BD for ; Mon, 30 Dec 2019 04:21:23 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: from mail-il1-f178.google.com (mail-il1-f178.google.com [209.85.166.178]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47mPPv2BJRz4Vx7; Mon, 30 Dec 2019 04:21:22 +0000 (UTC) (envelope-from pkelsey@gmail.com) Received: by mail-il1-f178.google.com with SMTP id s15so26993420iln.1; Sun, 29 Dec 2019 20:21:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=uj4GLteTtFX+jsSs228EsaKu+YsQOm5G+nvTmOp5OHU=; b=UjmuyTg1DJ9VlpiNPuOb+A/0vgtYlepgbjywNefN+Ha6CwX7Ep4AdMoG52NP43iqcQ EOt90nOR0QIf1r4M2hZsW1y7AnFQrxsgdyyBkMxU+7GEn3vaWIZo8DyklDX4YmdNaTGO iYAJrRivB0/KNcKnilr/8SkflZv8O7rpJHOfztnaP0iZTbef2SYcG6lsEi5WMt52x7LS Svz7JLzp5p7fkySMoyLAv+ZFgBXkXNeybdsepvotZVbeRhc3T/LIcMgWnFKsQMpZdtQD CzzRBxTiCLyXW4azSGgZm96oMbCci7G4xg2aIilXGOOT8k+wo1UT6bIqHKNOBkPq3gUn NmfA== X-Gm-Message-State: APjAAAV4TOVlAQbNepVoISvHyI2b3PpbYeTPE0gygqIhqn5x5D3FRkJD CA+8nqF3hqR0lt23B+qOC1vmeOB9/8GLeRy0cJfWJg== X-Google-Smtp-Source: APXvYqx1SZ7f11tqGiZCe7/L1lxfXRyHDSJSmJMvaQXjeJ+CLiBo57fr3JtHUT14R9TlXYudqlW+ZvihGoVaU3Y/gJ8= X-Received: by 2002:a92:770a:: with SMTP id s10mr46027960ilc.159.1577679681852; Sun, 29 Dec 2019 20:21:21 -0800 (PST) MIME-Version: 1.0 References: <67dc1ce9-274c-7e70-30dc-97e2d5767237@FreeBSD.org> <963e3042-90b4-4de2-e18c-3e29627a25a9@FreeBSD.org> <730aedd4-1400-1f76-42b7-3b5313501c86@FreeBSD.org> In-Reply-To: <730aedd4-1400-1f76-42b7-3b5313501c86@FreeBSD.org> From: Patrick Kelsey Date: Sun, 29 Dec 2019 23:21:10 -0500 Message-ID: Subject: Re: vmx: strange issue, related to to tso? To: Andriy Gapon Cc: Vincenzo Maffione , freebsd-net X-Rspamd-Queue-Id: 47mPPv2BJRz4Vx7 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Mon, 30 Dec 2019 04:21:23 -0000 On Sun, Dec 29, 2019 at 6:06 AM Andriy Gapon wrote: > On 28/12/2019 06:43, Patrick Kelsey wrote: > > I am not able to test this at the moment, nor likely in the very near > future, > > but I did have a few minutes to do some code reading and now believe > that the > > following is part of the problem, if not the entire problem. Using > r353803 as a > > reference, I believe line 1323 in sys/dev/vmware/vmxnet3/if_vmx.c (in > > vmxnet3_isc_txd_encap()) should be: > > > > sop->hlen = hdrlen + ipi->ipi_tcp_hlen; > > > > instead of the current: > > > > sop->hlen = hdrlen; > > > > This can be seen by going back to r333813 and examining the CSUM_TSO > case of > > vmxnet3_txq_offload_ctx(). The final increment of *start in that case > is what > > was literally lost in translation when converting the driver to iflib. > > Patrick, > > thank you very much! > The change (with s/ipi->/pi->/) fixes the problem for me. > Andriy, Thank you for the test report. Also, thank you for pointing out the typo - indeed, this line of code was not run through the spellchecker^H^H^Hcompiler. -Patrick