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.

MFC after:	1 month
Sponsored by:	Chelsio Communications
This commit is contained in:
John Baldwin 2018-11-15 23:31:04 +00:00
parent 2939ecd3ce
commit 47c64f9e3e

View File

@ -492,9 +492,9 @@ tls_program_key_id(struct toepcb *toep, struct tls_key_context *k_ctx)
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_context *k_ctx)
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);