From: Tom Herbert <tom@herbertland.com>
To: <davem@davemloft.net>, <netdev@vger.kernel.org>
Cc: <kernel-team@fb.com>, <rick.jones2@hpe.com>
Subject: [PATCH net-next 0/4] xps_flows: XPS flow steering when there is no socket
Date: Wed, 31 Aug 2016 17:10:01 -0700 [thread overview]
Message-ID: <1472688605-2613704-1-git-send-email-tom@herbertland.com> (raw)
This patch set introduces transmit flow steering for socketless packets.
The idea is that we record the transmit queues in a flow table that is
indexed by skbuff hash. The flow table entries have two values: the
queue_index and the head cnt of packets from the TX queue. We only allow
a queue to change for a flow if the tail cnt in the TX queue advances
beyond the recorded head cnt. That is the condition that should indicate
that all outstanding packets for the flow have completed transmission so
the queue can change.
Tracking the inflight queue is performed as part of DQL. Two fields are
added to the dql structure: num_enqueue_ops and num_completed_ops.
num_enqueue_ops incremented in dql_queued and num_completed_ops is
incremented in dql_completed by the number of operations completed (an
new argument to the function).
This patch set creates /sys/class/net/eth*/xps_dev_flow_table_cnt
which number of entries in the XPS flow table.
Note that the functionality here is technically best effort (for
instance we don't obtain a lock while processing a flow table entry).
Under high load it is possible that OOO packets can still be generated
due to XPS if two threads are hammering on the same flow table entry.
The assumption of this patches is that OOO packets are not the end of
the world and these should prevent OOO in most common use cases with
XPS.
This is a followup to previous RFC version. Fixes from RFC are:
- Move counters to DQL
- Fixed typo
- Simplified get flow index funtion
- Fixed sysfs flow_table_cnt to properly use DEVICE_ATTR_RW
- Renamed the mechanism
Tested:
Manually forced all packets to go through the xps_flows path.
Observed that some flows were deferred to change queues because
packets were in flight witht the flow bucket.
Tom Herbert (4):
net: Set SW hash in skb_set_hash_from_sk
dql: Add counters for number of queuing and completion operations
net: Add xps_dev_flow_table_cnt
xps_flows: XPS for packets that don't have a socket
include/linux/dynamic_queue_limits.h | 7 ++-
include/linux/netdevice.h | 26 ++++++++-
include/net/sock.h | 6 +-
lib/dynamic_queue_limits.c | 3 +-
net/Kconfig | 6 ++
net/core/dev.c | 85 ++++++++++++++++++++++++-----
net/core/net-sysfs.c | 103 +++++++++++++++++++++++++++++++++++
7 files changed, 214 insertions(+), 22 deletions(-)
--
2.8.0.rc2
next reply other threads:[~2016-09-01 0:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-01 0:10 Tom Herbert [this message]
2016-09-01 0:10 ` [PATCH net-next 1/4] net: Set SW hash in skb_set_hash_from_sk Tom Herbert
2016-09-01 0:10 ` [PATCH net-next 2/4] dql: Add counters for number of queuing and completion operations Tom Herbert
2016-09-01 0:10 ` [PATCH net-next 3/4] net: Add xps_dev_flow_table_cnt Tom Herbert
2016-09-01 0:10 ` [PATCH net-next 4/4] xps_flows: XPS for packets that don't have a socket Tom Herbert
2016-09-01 15:36 ` Alexander Duyck
2016-09-01 15:56 ` Tom Herbert
2016-09-01 23:18 ` Alexander Duyck
2016-09-01 0:37 ` [PATCH net-next 0/4] xps_flows: XPS flow steering when there is no socket Eric Dumazet
2016-09-01 16:14 ` Tom Herbert
2016-09-01 19:25 ` Florian Fainelli
2016-09-01 19:32 ` Tom Herbert
2016-09-01 19:46 ` Florian Fainelli
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=1472688605-2613704-1-git-send-email-tom@herbertland.com \
--to=tom@herbertland.com \
--cc=davem@davemloft.net \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
--cc=rick.jones2@hpe.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).