From owner-svn-src-head@freebsd.org Tue Sep 3 14:07:03 2019 Return-Path: Delivered-To: svn-src-head@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 A298BDD211; Tue, 3 Sep 2019 14:06:57 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46N8010sJKz4Q4X; Tue, 3 Sep 2019 14:06:57 +0000 (UTC) (envelope-from yuripv@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1452) id A11831ADF8; Tue, 3 Sep 2019 14:06:22 +0000 (UTC) X-Original-To: yuripv@localmail.freebsd.org Delivered-To: yuripv@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 869D51CCA9; Tue, 16 Apr 2019 14:41:02 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (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 "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2F07F8EC71; Tue, 16 Apr 2019 14:41:02 +0000 (UTC) (envelope-from owner-src-committers@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 538) id 0EA661CCA8; Tue, 16 Apr 2019 14:41:02 +0000 (UTC) Delivered-To: src-committers@localmail.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [96.47.72.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mx1.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by freefall.freebsd.org (Postfix) with ESMTPS id 9F3951CCA5; Tue, 16 Apr 2019 14:40:59 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward105o.mail.yandex.net (forward105o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::608]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBEE98EC5A; Tue, 16 Apr 2019 14:40:57 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from mxback13o.mail.yandex.net (mxback13o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::64]) by forward105o.mail.yandex.net (Yandex) with ESMTP id CE0B74200C29; Tue, 16 Apr 2019 17:40:44 +0300 (MSK) Received: from smtp2o.mail.yandex.net (smtp2o.mail.yandex.net [2a02:6b8:0:1a2d::26]) by mxback13o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id DcOlWtERgz-eixe7TNJ; Tue, 16 Apr 2019 17:40:44 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1555425644; bh=LyeSBExoooDMdbkugMcPot7vAjUmHd2i5fq7SRyia1k=; h=In-Reply-To:From:Date:References:To:Subject:Message-ID; b=IkWymUMFGDSyfIl3YTl5h/wW/ujWLIKvmbSA+GBBigcKp9XBJ5+GU4CaAAfIDAAvL 0oi0uc/eag/ukC4O7K7riFK5XSoh5mIb4FCNT2O7ABlrA0kF761NjK/hDg4vdn1HzN Otgo0RhEHQwAu5grFcL6F30fah6OndqTWQn8LxFk= Received: by smtp2o.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id MjrVIEt1Sd-ehaOSvrf; Tue, 16 Apr 2019 17:40:44 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) Subject: Re: svn commit: r341586 - head/sys/dev/mlx5/mlx5_en To: Slava Shwartsman , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201812051425.wB5EP38T004562@repo.freebsd.org> From: "Andrey V. Elsukov" Openpgp: id=E6591E1B41DA1516F0C9BC0001C5EA0410C8A17A Autocrypt: addr=bu7cher@yandex.ru; prefer-encrypt=mutual; keydata= mQENBEwBF1kBCADB9sXFhBEUy8qQ4X63Y8eBatYMHGEFWN9ypS5lI3RE6qQW2EYbxNk7qUC5 21YIIS1mMFVBEfvR7J9uc7yaYgFCEb6Sce1RSO4ULN2mRKGHP3/Sl0ijZEjWHV91hY1YTHEF ZW/0GYinDf56sYpDDehaBF5wkWIo1+QK5nmj3vl0DIDCMNd7QEiWpyLVwECgLX2eOAXByT8B bCqVhJGcG6iFP7/B9Ll6uX5gb8thM9LM+ibwErDBVDGiOgvfxqidab7fdkh893IBCXa82H9N CNwnEtcgzh+BSKK5BgvPohFMgRwjti37TSxwLu63QejRGbZWSz3OK3jMOoF63tCgn7FvABEB AAG0JUFuZHJleSBWLiBFbHN1a292IDxidTdjaGVyQHlhbmRleC5ydT6JATgEEwECACIFAkwB F1kCGwMGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEAHF6gQQyKF6qmYIAI6ekfm1VA4T vqankI1ISE6ku4jV7UlpIQlEbE7/8n3Zd6teJ+pGOQhN5qk8QE7utdPdbktAzi+x7LIJVzUw 4TywZLXGrkP7VKYkfg6oyCGyzITghefQeJtr2TN4hYCkzPWpylkue8MtmqfZv/6royqwTbN+ +E09FQNvTgRUYJYTeQ1qOsxNRycwvw3dr2rOfuxShbzaHBB1pBIjGrMg8fC5pd65ACH5zuFV A0CoTNGMDrEZSfBkTW604UUHFFXeCoC3dwDZRKOWJ3GmMXns65Ai5YkA63BSHEE1Qle3VBhd cG1w0CB5FBV3pB27UVnf0jEbysrDqW4qN7XMRFSWNAy5AQ0ETAEXWQEIAJ2p6l9LBoqdH/0J PEFDY2t2gTvAuzz+8zs3R03dFuHcNbOwjvWCG0aOmVpAzkRa8egn5JB4sZaFUtKPYJEQ1Iu+ LUBwgvtXf4vWpzC67zs2dDuiW4LamH5p6xkTD61aHR7mCB3bg2TUjrDWn2Jt44cvoYxj3dz4 S49U1rc9ZPgD5axCNv45j72tggWlZvpefThP7xT1OlNTUqye2gAwQravXpZkl5JG4eOqJVIU X316iE3qso0iXRUtO7OseBf0PiVmk+wCahdreHOeOxK5jMhYkPKVn7z1sZiB7W2H2TojbmcK HZC22sz7Z/H36Lhg1+/RCnGzdEcjGc8oFHXHCxUAEQEAAYkBHwQYAQIACQUCTAEXWQIbDAAK CRABxeoEEMihegkYCAC3ivGYNe2taNm/4Nx5GPdzuaAJGKWksV+w9mo7dQvU+NmI2az5w8vw 98OmX7G0OV9snxMW+6cyNqBrVFTu33VVNzz9pnqNCHxGvj5dL5ltP160JV2zw2bUwJBYsgYQ WfyJJIM7l3gv5ZS3DGqaGIm9gOK1ANxfrR5PgPzvI9VxDhlr2juEVMZYAqPLEJe+SSxbwLoz BcFCNdDAyXcaAzXsx/E02YWm1hIWNRxanAe7Vlg7OL+gvLpdtrYCMg28PNqKNyrQ87LQ49O9 50IIZDOtNFeR0FGucjcLPdS9PiEqCoH7/waJxWp6ydJ+g4OYRBYNM0EmMgy1N85JJrV1mi5i Message-ID: User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <201812051425.wB5EP38T004562@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Gc4FCLxF5RLpVDUgQhYnJWt4CbwtXFWML" Precedence: bulk X-Loop: FreeBSD.org Sender: owner-src-committers@freebsd.org X-Rspamd-Queue-Id: 2F07F8EC71 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; NEURAL_HAM_SHORT(-0.97)[-0.972,0]; ASN(0.00)[asn:11403, ipnet:96.47.64.0/20, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] Status: O X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Date: Tue, 03 Sep 2019 14:07:03 -0000 X-Original-Date: Tue, 16 Apr 2019 17:39:47 +0300 X-List-Received-Date: Tue, 03 Sep 2019 14:07:03 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --Gc4FCLxF5RLpVDUgQhYnJWt4CbwtXFWML Content-Type: multipart/mixed; boundary="CkT7XhrlVpnZaZvea4uGJsDAgElFOplO3"; protected-headers="v1" From: "Andrey V. Elsukov" To: Slava Shwartsman , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: Subject: Re: svn commit: r341586 - head/sys/dev/mlx5/mlx5_en References: <201812051425.wB5EP38T004562@repo.freebsd.org> In-Reply-To: <201812051425.wB5EP38T004562@repo.freebsd.org> --CkT7XhrlVpnZaZvea4uGJsDAgElFOplO3 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 05.12.2018 17:25, Slava Shwartsman wrote: > Author: slavash > Date: Wed Dec 5 14:25:03 2018 > New Revision: 341586 > URL: https://svnweb.freebsd.org/changeset/base/341586 >=20 > Log: > mlx5en: Implement backpressure indication. > =20 > The backpressure indication is implemented using an unlimited rate ty= pe of > mbuf send tag. When the upper layers typically the socket layer has o= btained such > a tag, it can then query the destination driver queue for the current= > amount of space available in the send queue. > =20 > A single mbuf send tag may be referenced multiple times and a refcoun= t has been added > to the mlx5e_priv structure to track its usage. Because the send tag = resides > in the mlx5e_channel structure, there is no need to wait for refcount= s to reach > zero until the mlx4en(4) driver is detached. The channels structure i= s persistant > during the lifetime of the mlx5en(4) driver it belongs to and can so = be accessed > without any need of synchronization. > =20 > The mlx5e_snd_tag structure was extended to contain a type field, bec= ause there are now > two different tag types which end up in the driver which need to be d= istinguished. > =20 > Submitted by: hselasky@ > Approved by: hselasky (mentor) > MFC after: 1 week > Sponsored by: Mellanox Technologies > @@ -587,27 +609,33 @@ mlx5e_xmit(struct ifnet *ifp, struct mbuf *mb) > struct mlx5e_sq *sq; > int ret; > =20 > - sq =3D mlx5e_select_queue(ifp, mb); > - if (unlikely(sq =3D=3D NULL)) { > -#ifdef RATELIMIT > - /* Check for route change */ > - if (mb->m_pkthdr.snd_tag !=3D NULL && > - mb->m_pkthdr.snd_tag->ifp !=3D ifp) { > + if (mb->m_pkthdr.snd_tag !=3D NULL) { > + sq =3D mlx5e_select_queue_by_send_tag(ifp, mb); > + if (unlikely(sq =3D=3D NULL)) { > + /* Check for route change */ > + if (mb->m_pkthdr.snd_tag->ifp !=3D ifp) { > + /* Free mbuf */ > + m_freem(mb); > + > + /* > + * Tell upper layers about route > + * change and to re-transmit this > + * packet: > + */ > + return (EAGAIN); > + } Hi, I just discovered something strange and found that this commit is the cause. The test system has mlx5en 100G interface. It has two vlans: vlan500 and vlan100. Via vlan500 it receives some packets flows. Then it routes these packets into vlan100. But packets are dropped in mlx5e_xmit() with EAGAIN error code. # dtrace -n 'fbt::ip6_output:return {printf("%d", arg1);}' dtrace: description 'fbt::ip6_output:return ' matched 1 probe CPU ID FUNCTION:NAME 23 54338 ip6_output:return 35 16 54338 ip6_output:return 35 21 54338 ip6_output:return 35 22 54338 ip6_output:return 35 24 54338 ip6_output:return 35 23 54338 ip6_output:return 35 14 54338 ip6_output:return 35 ^C # dtrace -n 'fbt::mlx5e_xmit:return {printf("%d", arg1);}' dtrace: description 'fbt::mlx5e_xmit:return ' matched 1 probe CPU ID FUNCTION:NAME 16 69030 mlx5e_xmit:return 35 23 69030 mlx5e_xmit:return 35 26 69030 mlx5e_xmit:return 35 25 69030 mlx5e_xmit:return 35 24 69030 mlx5e_xmit:return 35 21 69030 mlx5e_xmit:return 35 26 69030 mlx5e_xmit:return 35 ^C The kernel config is GENERIC. 13.0-CURRENT #9 r345758+82f3d57(svn_head)-dirty --=20 WBR, Andrey V. Elsukov --CkT7XhrlVpnZaZvea4uGJsDAgElFOplO3-- --Gc4FCLxF5RLpVDUgQhYnJWt4CbwtXFWML Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQEzBAEBCAAdFiEE5lkeG0HaFRbwybwAAcXqBBDIoXoFAly16TMACgkQAcXqBBDI oXoZfAf9Glf7TAruR75X9vsJ2J7jytk8xLTYCTW+U3kmjOToyIWEpmy1HNUDWN7p jjBvOijhFwZSXzV6mLL/Iy7D3xtomzl/a2Dn4sCKoM5TvYvHim2aQZtPlDnG3BI6 o4Qs705lnCl0li46Ilpmvv9wtdXCXqf9U9ayJe+3BPLojy/ryiXSrdT0EJyI0F3B d+pyntzQDw1EHlFXrn1paHiTkBjt1V+Hk7gwPP+w8jH6MnIj+Z2Awx6UpGbHfQ36 29JI087K98zG4AIadH0YPj0+myk2eVFzMSQj5Sr/LPU1HwPBtZzLVYD4zEjeRgKk GnzVIEoAWxkKU4Q3l2FgfM1csAMhWw== =yi8C -----END PGP SIGNATURE----- --Gc4FCLxF5RLpVDUgQhYnJWt4CbwtXFWML--