From: Ben Pfaff <blp@nicira.com>
To: Thomas Graf <tgraf@redhat.com>
Cc: jesse@nicira.com, dev@openvswitch.org, netdev@vger.kernel.org,
dborkman@redhat.com, ffusco@redhat.com, fleitner@redhat.com,
xiyou.wangcong@gmail.com
Subject: Re: [PATCH openvswitch v2] netlink: Implement & enable memory mapped netlink i/o
Date: Mon, 2 Dec 2013 13:23:25 -0800 [thread overview]
Message-ID: <20131202212325.GG15335@nicira.com> (raw)
In-Reply-To: <6a9efcafd9386ddd24fbfabb799bd2b5cc536430.1385814132.git.tgraf@redhat.com>
On Sat, Nov 30, 2013 at 01:27:33PM +0100, Thomas Graf wrote:
> Based on the initial patch by Cong Wang posted a couple of months
> ago.
>
> This is the user space counterpart needed for the kernel patch
> '[PATCH net-next 3/8] openvswitch: Enable memory mapped Netlink i/o'
>
> Allows the kernel to construct Netlink messages on memory mapped
> buffers and thus avoids copying. The functionality is enabled on
> sockets used for unicast traffic.
>
> Further optimizations are possible by avoiding the copy into the
> ofpbuf after reading.
>
> Signed-off-by: Thomas Graf <tgraf@redhat.com>
Clang reports:
../lib/netlink-socket.c:330:12: error: cast from 'char *' to 'struct nl_mmap_hdr *' increases required alignment from 1 to 4 [-Werror,-Wcast-align]
return (struct nl_mmap_hdr *)(start + r->head * sock->frame_size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../lib/netlink-socket.c:369:22: error: implicit declaration of function '__ALIGN_KERNEL' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
-> sock->frame_size)
^
../lib/netlink-protocol.h:213:26: note: expanded from macro 'NL_MMAP_HDRLEN'
#define NL_MMAP_HDRLEN NL_MMAP_MSG_ALIGN(sizeof(struct nl_mmap_hdr))
^
../lib/netlink-protocol.h:212:32: note: expanded from macro 'NL_MMAP_MSG_ALIGN'
#define NL_MMAP_MSG_ALIGN(sz) __ALIGN_KERNEL(sz, NL_MMAP_MSG_ALIGNMENT)
^
GCC reports:
../lib/netlink-socket.c: In function 'nl_sock_send_mmap':
../lib/netlink-socket.c:369:5: error: implicit declaration of function '__ALIGN_KERNEL' [-Werror=implicit-function-declaration]
cc1: all warnings being treated as errors
Thanks,
Ben.
next prev parent reply other threads:[~2013-12-02 21:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-30 12:27 [PATCH openvswitch v2] netlink: Implement & enable memory mapped netlink i/o Thomas Graf
2013-12-02 21:23 ` Ben Pfaff [this message]
2013-12-02 22:16 ` Thomas Graf
2013-12-02 22:26 ` Ben Pfaff
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=20131202212325.GG15335@nicira.com \
--to=blp@nicira.com \
--cc=dborkman@redhat.com \
--cc=dev@openvswitch.org \
--cc=ffusco@redhat.com \
--cc=fleitner@redhat.com \
--cc=jesse@nicira.com \
--cc=netdev@vger.kernel.org \
--cc=tgraf@redhat.com \
--cc=xiyou.wangcong@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox