[Intel-wired-lan] [next-queue v4 PATCH 4/7] net: store port/representator id in metadata_dst
Bowers, AndrewX
andrewx.bowers at intel.com
Tue Jan 24 19:15:15 UTC 2017
> -----Original Message-----
> From: Intel-wired-lan [mailto:intel-wired-lan-bounces at lists.osuosl.org] On
> Behalf Of Sridhar Samudrala
> Sent: Thursday, January 12, 2017 2:35 PM
> To: Duyck, Alexander H <alexander.h.duyck at intel.com>; Fastabend, John R
> <john.r.fastabend at intel.com>; Singhai, Anjali <anjali.singhai at intel.com>;
> jakub.kicinski at netronome.com; davem at davemloft.net; Peterson, Scott D
> <scott.d.peterson at intel.com>; gerlitz.or at gmail.com; jiri at resnulli.us; intel-
> wired-lan at lists.osuosl.org; netdev at vger.kernel.org
> Subject: [Intel-wired-lan] [next-queue v4 PATCH 4/7] net: store
> port/representator id in metadata_dst
>
> From: Jakub Kicinski <jakub.kicinski at netronome.com>
>
> Switches and modern SR-IOV enabled NICs may multiplex traffic from Port
> representators and control messages over single set of hardware queues.
> Control messages and muxed traffic may need ordered delivery.
>
> Those requirements make it hard to comfortably use TC infrastructure today
> unless we have a way of attaching metadata to skbs at the upper device.
> Because single set of queues is used for many netdevs stopping TC/sched
> queues of all of them reliably is impossible and lower device has to retreat to
> returning NETDEV_TX_BUSY and usually has to take extra locks on the
> fastpath.
>
> This patch attempts to enable port/representative devs to attach metadata
> to skbs which carry port id. This way representatives can be queueless and
> all queuing can be performed at the lower netdev in the usual way.
>
> Traffic arriving on the port/representative interfaces will be have metadata
> attached and will subsequently be queued to the lower device for
> transmission.
> The lower device should recognize the metadata and translate it to HW
> specific format which is most likely either a special header inserted before
> the network headers or descriptor/metadata fields.
>
> Metadata is associated with the lower device by storing the netdev pointer
> along with port id so that if TC decides to redirect or mirror the new netdev
> will not try to interpret it.
>
> This is mostly for SR-IOV devices since switches don't have lower netdevs
> today.
>
> Signed-off-by: Jakub Kicinski <jakub.kicinski at netronome.com>
> Signed-off-by: Sridhar Samudrala <sridhar.samudrala at intel.com>
> ---
> include/net/dst_metadata.h | 41
> ++++++++++++++++++++++++++++++++---------
> net/core/dst.c | 15 ++++++++++-----
> net/core/filter.c | 1 +
> net/ipv4/ip_tunnel_core.c | 6 ++++--
> net/openvswitch/flow_netlink.c | 4 +++-
> 5 files changed, 50 insertions(+), 17 deletions(-)
Tested-by: Andrew Bowers <andrewx.bowers at intel.com>
Does not break i40e/i40evf
More information about the Intel-wired-lan
mailing list