From owner-dev-commits-src-main@freebsd.org Sat May 15 20:56:13 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 C42FF64FFA3; Sat, 15 May 2021 20:56:13 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) (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 4FjHk46yv5z3rnR; Sat, 15 May 2021 20:56:12 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-lj1-x234.google.com with SMTP id p12so2606960ljg.1; Sat, 15 May 2021 13:56:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=u3P4RRuFANpBOQgVDLfIeMvs7Z29Xd/tfiRTqRDcXO4=; b=aSiu+ajARc4YQ99EbbfbpIQBl/dG2u9uPpN+ub4epe9I9tdYX8t7XvHsL29L9lX3MU 3K8vCR8CikQKyf+w8NxJaxaX6x36pWIqf4x6OMbZanrZYxAcSZMLTY6/TexNdA4s3dE0 WuJWf1vidn1jxr0/Du2kRqQ3WcpogWbddDEOZ5Ackzb6yeNsVsF5EKTtTjIEjbpfUgV5 R8JM8BxuZsiqQ8W+TEKWgfv+vXX7yMVKRBZIhznHmV6shVpKX1kRvFrG/gpZqfl7L4a/ drR1g5GYM/cTF+/1ldRXuiSzWxl/hzXTrB/ZmIDcc9Omd+TT4/aJQrJNavuyVvh1Sfpq 916Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=u3P4RRuFANpBOQgVDLfIeMvs7Z29Xd/tfiRTqRDcXO4=; b=BO5h5KbV85Wt6OYOmTtdVnSX7OnhKaTdkLspEiqozw5VMzhcMCnXgFtdEkzY5mKbMh MKcsX66KuG/xxLukNvlEuCHAszMtsrqfyFjkGVAYdvj7BiXR3vWxcGVTyTVv/4lBbz4i YwNz5jeLwohL/n1jFTDM3NSGngsBGntg5/NoWY9FZHd7XY8pp5/IdRP/uFKIkFBtWqRO MNgcnTwwFHxHzhARVnUWBL5f2ygXdyzxe5cSm0qgDkeUnpfsP73O8f2+IOtblciVWDWi PZ7UL3w/hKQmBzmCueSCgc48Skd7C3bE/YqMqL+Xe2s1+mVaMFZrN7unL0wOxIoFn9Vb GmeQ== X-Gm-Message-State: AOAM531E7t1/Gaip2mS9+EMk8vprrO/FwiP0jYOIPLd3WzZj8dz80qVk WVxLfLsi5ciCtZYPyffzPU1c+mgs4xuvgMmLS5CpI5BM X-Google-Smtp-Source: ABdhPJylAPDWx2g+2sskNL8cko1FqffbbnFUfeBd6zeCnbluqrXGY46c/59ETFoY+SJAtFqSkhCYh3Gx+ABFhsoPB/8= X-Received: by 2002:a2e:9acb:: with SMTP id p11mr42549540ljj.463.1621112170523; Sat, 15 May 2021 13:56:10 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a05:651c:485:0:0:0:0 with HTTP; Sat, 15 May 2021 13:56:09 -0700 (PDT) In-Reply-To: <202105141922.14EJM1pM058368@gitrepo.freebsd.org> References: <202105141922.14EJM1pM058368@gitrepo.freebsd.org> From: Mateusz Guzik Date: Sat, 15 May 2021 22:56:09 +0200 Message-ID: Subject: Re: git: e73e2ee0acf5 - main - cxgbei: Handle target transfers with excess unsolicited data. To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4FjHk46yv5z3rnR X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=aSiu+ajA; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of mjguzik@gmail.com designates 2a00:1450:4864:20::234 as permitted sender) smtp.mailfrom=mjguzik@gmail.com X-Spamd-Result: default: False [-3.73 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; NEURAL_HAM_MEDIUM(-1.00)[-0.997]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_FROM(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::234:from]; TO_DN_SOME(0.00)[]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::234:from:127.0.2.255]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::234:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_LONG(-0.73)[-0.732]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim] 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 20:56:13 -0000 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 /usr/src/sys/dev/cxgbe/tom/t4_ddp.c:1045:15: error: invalid operands to binary expression ('void *' and 'int') start_pva = 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 = trunc_page(sgl->addr); ^~~~~~~~~~~~~~~~~~~~~ ./machine/param.h:150:29: note: expanded from macro 'trunc_page' #define trunc_page(x) ((x) & ~PAGE_MASK) ~~~ ^ ~~~~~~~~~~ On 5/14/21, John Baldwin wrote: > The branch main has been updated by jhb: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=e73e2ee0acf5a0e0f47b9c2bcd73c835c4922fab > > commit e73e2ee0acf5a0e0f47b9c2bcd73c835c4922fab > Author: John Baldwin > AuthorDate: 2021-05-14 19:20:57 +0000 > Commit: John Baldwin > CommitDate: 2021-05-14 19:21:34 +0000 > > cxgbei: Handle target transfers with excess unsolicited data. > > 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. > > Reported by: Jithesh Arakkan @ Chelsio > Sponsored by: Chelsio Communications > > Differential Revision: https://reviews.freebsd.org/D29940 > --- > sys/dev/cxgbe/cxgbei/icl_cxgbei.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > 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 >= first_burst); > xferlen = 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 > -- Mateusz Guzik