Skip to content

bridge/ovs: avoid skb head copy on frame forwarding

Paolo Abeni netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 2 repliesIn review
  2. v25 patches 2 repliesSuperseded
  3. v15 patches 9 repliesSuperseded

Changes in v3 from the cover letter

- fix a comment typo

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5netdev: introduce ndo_set_rx_headroominclude/linux/netdevice.h+31 -00 replies
2/5bridge: notify enslaved devices of headroom changesnet/bridge/br_if.c+35 -20 replies
3/5ovs: propagate per dp max headroom to all vportsnet/openvswitch/datapath.c net/openvswitch/datapath.h net/openvswitch/vport-internal_dev.c+53 -10 replies
4/5net/tun: implement ndo_set_rx_headroomdrivers/net/tun.c+16 -10 replies
5/5veth: implement ndo_set_rx_headroomdrivers/net/veth.c+26 -00 replies

Reviews trailers per patch

None of the 5 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchPravin B Shelar
SeriesA-b
1/5
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [PATCH net-next v3 0/5] bridge/ovs: avoid skb head copy on frame forwarding

Currently, while when an OVS or Linux bridge is used to forward frames towards some tunnel device, a skb_head_copy() may occur if the ingress device do not provide enough headroom for the tx encapsulation.

This patch series tries to address the issue implementing a new ndo operation to allow the master device to control the headroom used when allocating the skb on frame reception.

Said operation is used by the Linux bridge to notify the bridged ports of needed_headroom changes, and similar bookkeeping and behaviour is also added to openvswitch, on a per datapath basis.

Finally, the operation is implemented for veth and tun device, which give performance improvement in the 6-12% range when forwarding frames from said devices towards a vxlan tunnel.

v2:
- fix netdev_get_fwd_headroom() behaviour
- remove some code duplication with the netdev_set_rx_headroom() and netdev_reset_rx_headroom() helpers
- handle headroom reset on [v]port removal/deletion
- initialize tun align to the old default value

v3:
- fix a comment typo

Paolo Abeni (5):
netdev: introduce ndo_set_rx_headroom
bridge: notify enslaved devices of headroom changes
ovs: propagate per dp max headroom to all vports net/tun: implement ndo_set_rx_headroom
veth: implement ndo_set_rx_headroom

 drivers/net/tun.c                    | 17 ++++++++++++++-
 drivers/net/veth.c                   | 26 +++++++++++++++++++++++
 include/linux/netdevice.h            | 31 ++++++++++++++++++++++++++++
 net/bridge/br_if.c                   | 37 +++++++++++++++++++++++++++++++--
 net/openvswitch/datapath.c           | 40 ++++++++++++++++++++++++++++++++++++
 net/openvswitch/datapath.h           |  4 ++++
 net/openvswitch/vport-internal_dev.c | 10 ++++++++-
 7 files changed, 161 insertions(+), 4 deletions(-)
Signature · 1 line
1.8.3.1