netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/4] xps_flows: XPS flow steering when there is no socket
@ 2016-09-01  0:10 Tom Herbert
  2016-09-01  0:10 ` [PATCH net-next 1/4] net: Set SW hash in skb_set_hash_from_sk Tom Herbert
                   ` (5 more replies)
  0 siblings, 6 replies; 13+ messages in thread
From: Tom Herbert @ 2016-09-01  0:10 UTC (permalink / raw)
  To: davem, netdev; +Cc: kernel-team, rick.jones2

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-09-01 23:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-01  0:10 [PATCH net-next 0/4] xps_flows: XPS flow steering when there is no socket Tom Herbert
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

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).