From owner-dev-commits-src-main@freebsd.org Sat May 15 21:25:10 2021 Return-Path: Delivered-To: dev-commits-src-main@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 F04A262835A for ; Sat, 15 May 2021 21:25:10 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4FjJMV6JK1z3vlV for ; Sat, 15 May 2021 21:25:10 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wm1-f45.google.com with SMTP id u133so1463847wmg.1 for ; Sat, 15 May 2021 14:25:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=+NQ0JGpMrnEYkuoL4ruQ5d4fx+ZcAWcjyboX8xjX+QU=; b=TxSs/xV42JF91F8rg4ytKRZXEQPAH78xMs5Z1DiO3yQ7IOYY+oCtghpWw3leRKM7rr yfsOyRcF9yYxnGvbEWsloNoUDq+BSgMhlP40/y17NzuB4+Khae1mRJp5KfyDxCbqy1zt i2+wpGX7vKtRlmIJXB1yNG8FgnAPKLWY48HL8lZqR6IJrrovWYIHBxCJ7wLvicHIKmcz 4TAKF6EQ4dbyhgdzyw3FDSmVVbWx9emHlZWTl1FDdo2fWxv0/jISmavuLQfYULKqTt7r tvtq7GQ+rw97odWIZKABQzf8BjNVK1mondgWd9JG10X7nbbyAvr9iLa9UZygR99u9Iaq BJLA== X-Gm-Message-State: AOAM530eAggGnmQNl+ppEE+v5phMU8WoIjfIJOONLOeGYKBa42m57WNd coUErSoNedCqPKyMm+l9mAecSQ== X-Google-Smtp-Source: ABdhPJydoeNd5dUz4L5Pt+hW79x2P3FGPYZ0Fv+6c9CDH5Ycud3olFTC6Un/nRCJ/SgzWa9nD+vfBA== X-Received: by 2002:a1c:c911:: with SMTP id f17mr57365662wmb.45.1621113909413; Sat, 15 May 2021 14:25:09 -0700 (PDT) Received: from [192.168.150.48] (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id z66sm16182477wmc.4.2021.05.15.14.25.08 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 15 May 2021 14:25:09 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\)) Subject: Re: git: e73e2ee0acf5 - main - cxgbei: Handle target transfers with excess unsolicited data. From: Jessica Clarke In-Reply-To: Date: Sat, 15 May 2021 22:25:08 +0100 Cc: John Baldwin , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <2B05ED91-15B0-468B-A23A-266BD559419D@freebsd.org> References: <202105141922.14EJM1pM058368@gitrepo.freebsd.org> To: Mateusz Guzik X-Mailer: Apple Mail (2.3654.60.0.2.21) X-Rspamd-Queue-Id: 4FjJMV6JK1z3vlV X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 May 2021 21:25:11 -0000 On 15 May 2021, at 21:56, Mateusz Guzik wrote: >=20 > One of these commits breaks tinderbox: > i386 MINIMAL kernel failed, check _.i386.MINIMAL for details > i386 GENERIC kernel failed, check _.i386.GENERIC for details > i386 GENERIC-NODEBUG kernel failed, check _.i386.GENERIC-NODEBUG for = details > i386 PAE kernel failed, check _.i386.PAE for details > i386 LINT kernel failed, check _.i386.LINT for details > i386 LINT-NOINET kernel failed, check _.i386.LINT-NOINET for details > i386 LINT-NOINET6 kernel failed, check _.i386.LINT-NOINET6 for details > i386 LINT-NOIP kernel failed, check _.i386.LINT-NOIP for details >=20 > /usr/src/sys/dev/cxgbe/tom/t4_ddp.c:1045:15: error: invalid operands > to binary expression ('void *' and 'int') > start_pva =3D trunc_page(sgl->addr); > ^~~~~~~~~~~~~~~~~~~~~ > ./machine/param.h:150:29: note: expanded from macro 'trunc_page' > #define trunc_page(x) ((x) & ~PAGE_MASK) > ~~~ ^ ~~~~~~~~~~ > /usr/src/sys/dev/cxgbe/tom/t4_ddp.c:1300:8: error: invalid operands to > binary expression ('void *' and 'int') > pva =3D trunc_page(sgl->addr); > ^~~~~~~~~~~~~~~~~~~~~ > ./machine/param.h:150:29: note: expanded from macro 'trunc_page' > #define trunc_page(x) ((x) & ~PAGE_MASK) > ~~~ ^ ~~~~~~~~~~ It seems amd64, arm64 and riscv cast to unsigned long first, but arm, = i386, mips and powerpc do not. These macros should probably just become MI in sys/sys/param.h rather than fixing the MD copies to include casts. Jess > On 5/14/21, John Baldwin wrote: >> The branch main has been updated by jhb: >>=20 >> URL: >> = https://cgit.FreeBSD.org/src/commit/?id=3De73e2ee0acf5a0e0f47b9c2bcd73c835= c4922fab >>=20 >> commit e73e2ee0acf5a0e0f47b9c2bcd73c835c4922fab >> Author: John Baldwin >> AuthorDate: 2021-05-14 19:20:57 +0000 >> Commit: John Baldwin >> CommitDate: 2021-05-14 19:21:34 +0000 >>=20 >> cxgbei: Handle target transfers with excess unsolicited data. >>=20 >> The CTL frontend might have provided a buffer that is smaller than = the >> FirstBurstLength and thus smaller than the amount of unsolicited = data >> included in the request PDU. Treat these transfers as an empty >> transfer. >>=20 >> Reported by: Jithesh Arakkan @ Chelsio >> Sponsored by: Chelsio Communications >>=20 >> Differential Revision: https://reviews.freebsd.org/D29940 >> --- >> sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 9 +++++++-- >> 1 file changed, 7 insertions(+), 2 deletions(-) >>=20 >> diff --git a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c >> b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c >> index 7f638c96483a..c4eb4a35ad31 100644 >> --- a/sys/dev/cxgbe/cxgbei/icl_cxgbei.c >> +++ b/sys/dev/cxgbe/cxgbei/icl_cxgbei.c >> @@ -1064,10 +1064,15 @@ icl_cxgbei_conn_transfer_setup(struct = icl_conn *ic, >> union ctl_io *io, >> /* >> * Note that ICL calls conn_transfer_setup even if the = first >> * burst had everything and there's nothing left to = transfer. >> + * >> + * NB: The CTL frontend might have provided a buffer >> + * whose length (kern_data_len) is smaller than the >> + * FirstBurstLength of unsolicited data. Treat those >> + * as an empty transfer. >> */ >> - MPASS(ctsio->kern_data_len >=3D first_burst); >> xferlen =3D ctsio->kern_data_len; >> - if (xferlen - first_burst < ci->ddp_threshold) { >> + if (xferlen < first_burst || >> + xferlen - first_burst < ci->ddp_threshold) { >> no_ddp: >> /* >> * No DDP for this transfer. Allocate a TTT = (based on >>=20 >=20 >=20 > --=20 > Mateusz Guzik