From: Zhi Yong Wu <zwu.kernel@gmail.com>
To: Tom Herbert <therbert@google.com>
Cc: Linux Netdev List <netdev@vger.kernel.org>,
Eric Dumazet <edumazet@google.com>,
David Miller <davem@davemloft.net>,
Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
Subject: Re: [RFC PATCH net-next 2/3] virtio_net: Introduce one dummy function virtnet_filter_rfs()
Date: Thu, 16 Jan 2014 10:45:28 +0800 [thread overview]
Message-ID: <CAEH94Lj7VGamzKCKyxWviRO2P7Hmz=DZWgqaoQCUYzYUWy=9aw@mail.gmail.com> (raw)
In-Reply-To: <CA+mtBx8Z80d5Y1ti0_68UA-x0hZPeqT4wa9knevWoPxX+eyaVA@mail.gmail.com>
On Thu, Jan 16, 2014 at 1:54 AM, Tom Herbert <therbert@google.com> wrote:
> Zhi, this is promising work! I can't wait to see how this impacts
"Zhi" is part of my first name, you call me "Zhi Yong".
> network virtualization performance :-)
heh, too much work is missing.
>
> On Wed, Jan 15, 2014 at 6:20 AM, Zhi Yong Wu <zwu.kernel@gmail.com> wrote:
>> From: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
>>
>> Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>
>> ---
>> drivers/net/virtio_net.c | 11 +++++++++++
>> 1 files changed, 11 insertions(+), 0 deletions(-)
>>
>> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
>> index 7b17240..046421c 100644
>> --- a/drivers/net/virtio_net.c
>> +++ b/drivers/net/virtio_net.c
>> @@ -1295,6 +1295,14 @@ static int virtnet_change_mtu(struct net_device *dev, int new_mtu)
>> return 0;
>> }
>>
>> +#ifdef CONFIG_RFS_ACCEL
>> +static int virtnet_filter_rfs(struct net_device *net_dev,
>> + const struct sk_buff *skb, u16 rxq_index, u32 flow_id)
>> +{
> Does this need to be filled out with more stuff?
Yes, the following stuff are missing:
1.) guest virtio_net driver should have one filter table and its
entries can be expired periodically;
2.) guest virtio_net driver should pass rx queue index and filter
info down to the emulated virtio_net NIC in QEMU.
3.) the emulated virtio_net NIC should have its indirect table to
store the flow to rx queue mapping.
4.) the emulated virtio_net NIC should classify the rx packet to
selected queue by applying the filter.
5.) update virtio spec.
Do i miss anything? If yes, please correct me.
For 3.) and 4.), do you have any doc about how they are implemented in
physical NICs? e.g. mlx4_en or sfc, etc.
>
>> + return 0;
>> +}
>> +#endif /* CONFIG_RFS_ACCEL */
>> +
>> static const struct net_device_ops virtnet_netdev = {
>> .ndo_open = virtnet_open,
>> .ndo_stop = virtnet_close,
>> @@ -1309,6 +1317,9 @@ static const struct net_device_ops virtnet_netdev = {
>> #ifdef CONFIG_NET_POLL_CONTROLLER
>> .ndo_poll_controller = virtnet_netpoll,
>> #endif
>> +#ifdef CONFIG_RFS_ACCEL
>> + .ndo_rx_flow_steer = virtnet_filter_rfs,
>> +#endif
>> };
>>
>> static void virtnet_config_changed_work(struct work_struct *work)
>> --
>> 1.7.6.5
>>
--
Regards,
Zhi Yong Wu
next prev parent reply other threads:[~2014-01-16 2:45 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-15 14:20 [RFC PATCH net-next 0/3] virtio_net: add aRFS support Zhi Yong Wu
2014-01-15 14:20 ` [RFC PATCH net-next 1/3] virtio_pci: Introduce one new config api vp_get_vq_irq() Zhi Yong Wu
2014-01-15 14:20 ` [RFC PATCH net-next 2/3] virtio_net: Introduce one dummy function virtnet_filter_rfs() Zhi Yong Wu
2014-01-15 17:54 ` Tom Herbert
2014-01-16 2:45 ` Zhi Yong Wu [this message]
2014-01-15 14:20 ` [RFC PATCH net-next 3/3] virtio-net: Add accelerated RFS support Zhi Yong Wu
2014-01-16 21:31 ` Ben Hutchings
2014-01-16 22:00 ` Zhi Yong Wu
2014-01-16 23:16 ` Ben Hutchings
2014-01-17 16:54 ` Zhi Yong Wu
2014-01-17 17:20 ` Ben Hutchings
2014-01-18 4:59 ` Tom Herbert
2014-01-18 14:19 ` Ben Hutchings
2014-01-16 4:23 ` [RFC PATCH net-next 0/3] virtio_net: add aRFS support Jason Wang
2014-01-16 8:34 ` Fwd: " Zhi Yong Wu
2014-01-16 8:52 ` Stefan Hajnoczi
2014-01-16 17:12 ` Tom Herbert
2014-01-17 3:26 ` Jason Wang
2014-01-17 5:08 ` Tom Herbert
2014-01-17 6:36 ` Jason Wang
2014-01-17 16:03 ` Tom Herbert
2014-01-17 5:22 ` Stefan Hajnoczi
2014-01-17 6:45 ` Jason Wang
2014-01-20 14:36 ` Ben Hutchings
2014-01-22 13:27 ` Zhi Yong Wu
2014-01-22 18:00 ` Tom Herbert
2014-01-23 0:40 ` Zhi Yong Wu
2014-01-23 14:23 ` Michael S. Tsirkin
2014-01-17 3:04 ` Jason Wang
2014-01-20 16:49 ` Stefan Hajnoczi
2014-01-16 8:48 ` Zhi Yong Wu
2014-01-23 14:26 ` Michael S. Tsirkin
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='CAEH94Lj7VGamzKCKyxWviRO2P7Hmz=DZWgqaoQCUYzYUWy=9aw@mail.gmail.com' \
--to=zwu.kernel@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.org \
--cc=therbert@google.com \
--cc=wuzhy@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).