Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1456713
| From | John Fastabend <john.fastabend@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [RFC V2 PATCH 17/25] net/netpolicy: introduce netpolicy_pick_queue |
| Date | 2016-08-04 22:30 +0200 |
| Message-ID | <s2xrb-62U-5@gated-at.bofh.it> (permalink) |
| References | <s2wEN-5rB-7@gated-at.bofh.it> <s2wOu-5y4-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 16-08-04 12:36 PM, kan.liang@intel.com wrote:
> From: Kan Liang <kan.liang@intel.com>
>
> To achieve better network performance, the key step is to distribute the
> packets to dedicated queues according to policy and system run time
> status.
>
> This patch provides an interface which can return the proper dedicated
> queue for socket/task. Then the packets of the socket/task will be
> redirect to the dedicated queue for better network performance.
>
> For selecting the proper queue, currently it uses round-robin algorithm
> to find the available object from the given policy object list. The
> algorithm is good enough for now. But it could be improved by some
> adaptive algorithm later.
>
> The selected object will be stored in hashtable. So it does not need to
> go through the whole object list every time.
>
> Signed-off-by: Kan Liang <kan.liang@intel.com>
> ---
> include/linux/netpolicy.h | 5 ++
> net/core/netpolicy.c | 136 ++++++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 141 insertions(+)
>
There is a hook in the tx path now (recently added)
# ifdef CONFIG_NET_EGRESS
if (static_key_false(&egress_needed)) {
skb = sch_handle_egress(skb, &rc, dev);
if (!skb)
goto out;
}
# endif
that allows pushing any policy you like for picking tx queues. It would
be better to use this mechanism. The hook runs 'tc' classifiers so
either write a new ./net/sch/cls_*.c for this or just use ebpf to stick
your policy in at runtime.
I'm out of the office for a few days but when I get pack I can test that
it actually picks the selected queue in all cases I know there was an
issue with some of the drivers using select_queue awhile back.
.John
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[RFC V2 PATCH 17/25] net/netpolicy: introduce netpolicy_pick_queue kan.liang@intel.com - 2016-08-04 21:50 +0200
Re: [RFC V2 PATCH 17/25] net/netpolicy: introduce netpolicy_pick_queue John Fastabend <john.fastabend@gmail.com> - 2016-08-04 22:30 +0200
Re: [RFC V2 PATCH 17/25] net/netpolicy: introduce netpolicy_pick_queue Daniel Borkmann <daniel@iogearbox.net> - 2016-08-05 00:40 +0200
Re: [RFC V2 PATCH 17/25] net/netpolicy: introduce netpolicy_pick_queue Andi Kleen <andi@firstfloor.org> - 2016-08-05 01:00 +0200
Re: [RFC V2 PATCH 17/25] net/netpolicy: introduce netpolicy_pick_queue Daniel Borkmann <daniel@iogearbox.net> - 2016-08-05 02:20 +0200
Re: [RFC V2 PATCH 17/25] net/netpolicy: introduce netpolicy_pick_queue Tom Herbert <tom@herbertland.com> - 2016-08-05 16:50 +0200
Re: [RFC V2 PATCH 17/25] net/netpolicy: introduce netpolicy_pick_queue Tom Herbert <tom@herbertland.com> - 2016-08-05 06:00 +0200
RE: [RFC V2 PATCH 17/25] net/netpolicy: introduce netpolicy_pick_queue "Liang, Kan" <kan.liang@intel.com> - 2016-08-05 16:00 +0200
Re: [RFC V2 PATCH 17/25] net/netpolicy: introduce netpolicy_pick_queue Tom Herbert <tom@herbertland.com> - 2016-08-05 16:40 +0200
csiph-web