From: John Fastabend <john.fastabend@gmail.com>
To: Tom Herbert <tom@quantonium.net>, netdev@vger.kernel.org
Cc: rohit@quantonium.net
Subject: Re: [PATCH net-next 1/3] proto_ops: Add locked held versions of sendmsg and sendpage
Date: Thu, 03 Aug 2017 13:21:40 -0700 [thread overview]
Message-ID: <598385D4.5050205@gmail.com> (raw)
In-Reply-To: <20170728232243.3040-2-tom@quantonium.net>
On 07/28/2017 04:22 PM, Tom Herbert wrote:
> Add new proto_ops sendmsg_locked and sendpage_locked that can be
> called when the socket lock is already held. Correspondingly, add
> kernel_sendmsg_locked and kernel_sendpage_locked as front end
> functions.
>
> These functions will be used in zero proxy so that we can take
> the socket lock in a ULP sendmsg/sendpage and then directly call the
> backend transport proto_ops functions.
>
[...]
>
> +int kernel_sendpage_locked(struct sock *sk, struct page *page, int offset,
> + size_t size, int flags)
> +{
> + struct socket *sock = sk->sk_socket;
> +
> + if (sock->ops->sendpage_locked)
> + return sock->ops->sendpage_locked(sk, page, offset, size,
> + flags);
> +
> + return sock_no_sendpage_locked(sk, page, offset, size, flags);
> +}
How about just returning EOPNOTSUPP here and force implementations to do both
sendmsg and sendpage. The only implementation of these callbacks already does
this. And if its any other socket it will just wind its way through a few
layers of calls before returning EOPNOTSUPP.
.John
next prev parent reply other threads:[~2017-08-03 20:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-28 23:22 [PATCH net-next 0/3] net: Infrastructure changes for [kz]proxy Tom Herbert
2017-07-28 23:22 ` [PATCH net-next 1/3] proto_ops: Add locked held versions of sendmsg and sendpage Tom Herbert
2017-08-03 19:49 ` John Fastabend
2017-08-03 20:21 ` John Fastabend [this message]
2017-08-03 21:07 ` Tom Herbert
2017-07-28 23:22 ` [PATCH net-next 2/3] skbuff: Function to send an skbuf on a socket Tom Herbert
2017-08-03 19:51 ` John Fastabend
2017-07-28 23:22 ` [PATCH net-next 3/3] strparser: Generalize strparser Tom Herbert
2017-10-19 17:42 ` Eric Dumazet
[not found] ` <CALx6S3765-5oT6UtSQVts4KwWz3F3ub2vhDWO7YemYZPPM0EjA@mail.gmail.com>
2017-10-19 20:18 ` John Fastabend
2017-08-01 22:26 ` [PATCH net-next 0/3] net: Infrastructure changes for [kz]proxy David Miller
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=598385D4.5050205@gmail.com \
--to=john.fastabend@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=rohit@quantonium.net \
--cc=tom@quantonium.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).