All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Chuck Lever <cel@kernel.org>
Cc: pabeni@redhat.com, edumazet@google.com, netdev@vger.kernel.org,
	kernel-tls-handshake@lists.linux.dev, john.haxby@oracle.com
Subject: Re: [PATCH v6 2/2] net/tls: Add kernel APIs for requesting a TLSv1.3 handshake
Date: Fri, 3 Mar 2023 18:23:23 -0800	[thread overview]
Message-ID: <20230303182323.73575671@kernel.org> (raw)
In-Reply-To: <167786949822.7199.14892713296931249747.stgit@91.116.238.104.host.secureserver.net>

On Fri, 03 Mar 2023 13:51:38 -0500 Chuck Lever wrote:
> +	ret = -EMSGSIZE;
> +	ret = nla_put_u32(msg, HANDSHAKE_A_ACCEPT_SOCKFD, fd);
> +	if (ret < 0)
> +		goto out_cancel;
> +	ret = nla_put_u32(msg, HANDSHAKE_A_ACCEPT_MESSAGE_TYPE, treq->th_type);
> +	if (ret < 0)
> +		goto out_cancel;

feel free to do:

	if (nla_put_u32(msg, ...) ||
	    nla_put_u32(msg, ...))
		goto out_cancel;

we assume this helper can only return -EMSGSIZE or 0 in so many places
it's unlikely to ever change..

  reply	other threads:[~2023-03-04  2:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-03 18:51 [PATCH v6 0/2] Another crack at a handshake upcall mechanism Chuck Lever
2023-03-03 18:51 ` [PATCH v6 1/2] net/handshake: Create a NETLINK service for handling handshake requests Chuck Lever
2023-03-04  2:21   ` Jakub Kicinski
2023-03-04 17:25     ` Chuck Lever III
2023-03-04 17:44       ` Chuck Lever III
     [not found]         ` <20230304111616.1b11acea@kernel.org>
2023-03-04 19:48           ` Chuck Lever III
2023-03-04 20:01             ` Jakub Kicinski
2023-03-04 20:19               ` Chuck Lever III
2023-03-04 20:45                 ` Jakub Kicinski
2023-03-04 21:40                   ` Chuck Lever III
2023-03-06 19:34                   ` Chuck Lever III
2023-03-03 18:51 ` [PATCH v6 2/2] net/tls: Add kernel APIs for requesting a TLSv1.3 handshake Chuck Lever
2023-03-04  2:23   ` Jakub Kicinski [this message]
2023-03-10 15:25   ` Chuck Lever III
2023-03-10 22:31     ` Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230303182323.73575671@kernel.org \
    --to=kuba@kernel.org \
    --cc=cel@kernel.org \
    --cc=edumazet@google.com \
    --cc=john.haxby@oracle.com \
    --cc=kernel-tls-handshake@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.