Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jan 2019 21:43:19 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r343064 - stable/12/sys/dev/cxgbe/tom
Message-ID:  <201901152143.x0FLhJXl043707@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Tue Jan 15 21:43:18 2019
New Revision: 343064
URL: https://svnweb.freebsd.org/changeset/base/343064

Log:
  MFC 340469: Remove bogus roundup2() of the key programming work request header.
  
  The key context is always placed immediately after the work request
  header.  The total work request length has to be rounded up by 16
  however.

Modified:
  stable/12/sys/dev/cxgbe/tom/t4_tls.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/dev/cxgbe/tom/t4_tls.c
==============================================================================
--- stable/12/sys/dev/cxgbe/tom/t4_tls.c	Tue Jan 15 21:40:51 2019	(r343063)
+++ stable/12/sys/dev/cxgbe/tom/t4_tls.c	Tue Jan 15 21:43:18 2019	(r343064)
@@ -492,9 +492,9 @@ tls_program_key_id(struct toepcb *toep, struct tls_key
 	struct tls_key_req *kwr;
 	struct tls_keyctx *kctx;
 
-	kwrlen = roundup2(sizeof(*kwr), 16);
+	kwrlen = sizeof(*kwr);
 	kctxlen = roundup2(sizeof(*kctx), 32);
-	len = kwrlen + kctxlen;
+	len = roundup2(kwrlen + kctxlen, 16);
 
 	if (toep->txsd_avail == 0)
 		return (EAGAIN);
@@ -536,7 +536,6 @@ tls_program_key_id(struct toepcb *toep, struct tls_key
 	kwr->sc_more = htobe32(V_ULPTX_CMD(ULP_TX_SC_IMM));
 	kwr->sc_len = htobe32(kctxlen);
 
-	/* XXX: This assumes that kwrlen == sizeof(*kwr). */
 	kctx = (struct tls_keyctx *)(kwr + 1);
 	memset(kctx, 0, kctxlen);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901152143.x0FLhJXl043707>