[ovs-git] [openvswitch/ovs] 8613db: dp-packet: Remove 'list' member.

GitHub noreply at github.com
Mon May 18 22:40:23 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 8613db65be6a4641eebc01765637701287f78efc
      https://github.com/openvswitch/ovs/commit/8613db65be6a4641eebc01765637701287f78efc
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-05-18 (Mon, 18 May 2015)

  Changed paths:
    M lib/dp-packet.c
    M lib/dp-packet.h
    M lib/netdev-dummy.c
    M ofproto/ofproto-dpif.c

  Log Message:
  -----------
  dp-packet: Remove 'list' member.

The 'list' member is only used (two users) in the slow path.
This commit removes it to reduce the struct size

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Pravin B Shelar <pshelar at nicira.com>


  Commit: 82eb5b0abaf0125898a89e032f27fdd08e03169b
      https://github.com/openvswitch/ovs/commit/82eb5b0abaf0125898a89e032f27fdd08e03169b
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-05-18 (Mon, 18 May 2015)

  Changed paths:
    M lib/dp-packet.c
    M lib/dp-packet.h
    M lib/flow.c
    M lib/packets.c
    M lib/rstp-state-machines.c
    M lib/stp.c

  Log Message:
  -----------
  dp-packet: Remove 'frame' member.

In 'struct ofpbuf' the 'frame' pointer was used to parse different kinds of
data (Ethernet, OpenFlow, Netlink attributes).  For Ethernet packets the
'frame' pointer was supposed to have the same value as the 'data'
pointer.

Since 'struct dp_packet' is only used for Ethernet packets, there's no
need for a separate 'frame' pointer: we can use the 'data' pointer
instead.

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Pravin B Shelar <pshelar at nicira.com>


  Commit: 11a6fbd553ec46b890459e82e5387d28a2664695
      https://github.com/openvswitch/ovs/commit/11a6fbd553ec46b890459e82e5387d28a2664695
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-05-18 (Mon, 18 May 2015)

  Changed paths:
    M lib/dp-packet.c
    M lib/dp-packet.h

  Log Message:
  -----------
  dp-packet: Merge 'allocated' member with DPDK mbuf 'buf_len'.

DPDK buf_len is only 16-bit wide ('allocated' was 32-bit), but it should
be enough to store the number of allocated bytes.

This will reduce 'struct dp_packet' size.

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Pravin B Shelar <pshelar at nicira.com>


  Commit: 5a07c6e177af50a38bf37600c315f6d4a6b47b91
      https://github.com/openvswitch/ovs/commit/5a07c6e177af50a38bf37600c315f6d4a6b47b91
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-05-18 (Mon, 18 May 2015)

  Changed paths:
    M lib/dp-packet.h

  Log Message:
  -----------
  dp-packet: Style fixes.

Also, removes an unused function

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Pravin B Shelar <pshelar at nicira.com>


  Commit: efa2bcbb358b0cb71524d5ad329edb495c123d11
      https://github.com/openvswitch/ovs/commit/efa2bcbb358b0cb71524d5ad329edb495c123d11
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-05-18 (Mon, 18 May 2015)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Store pkt_metadata structure in dp_netdev_port.

Initializing a struct pkt_metadata for every packet can be surprisingly
expensive.  It's much faster to keep a copy for each port and copying it
on each packet.

Suggested-by: Pravin Shelar <pshelar at nicira.com>
Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Pravin B Shelar <pshelar at nicira.com>


  Commit: 11e5cf1f9043637613502f4477c8fd5ce6d65f12
      https://github.com/openvswitch/ovs/commit/11e5cf1f9043637613502f4477c8fd5ce6d65f12
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-05-18 (Mon, 18 May 2015)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Store batch pointer in dp_netdev_flow.

The userspace datapath

1. receives a batch of packets.
2. finds a 'netdev_flow' (megaflow) for each packet.
3. groups the packets in output batches based on the 'netdev_flow'.

Until now the grouping (2) was done using a simple algorithm with a
O(N^2) runtime, where N is the number of distinct megaflows of the packets
in the incoming batch.  This could quickly become a bottleneck, even with
a small number of megaflows.

With this commit the datapath simply stores in the 'netdev_flow' (the
megaflow) a pointer to the output batch, if one has been created for the
current input batch.  The pointer will be cleared when the output batch
is sent.

In a simple phy2phy test with 128 megaflows the throughput is more than
doubled.

The reason that stopped us from doing this change was that the
'netdev_flow' memory was shared between multiple threads: this is no
longer the case with the per-thread classifier.

Also, this commit reorders struct dp_netdev_flow to group toghether the
members used in the fastpath.

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Pravin B Shelar <pshelar at nicira.com>


  Commit: 8aaa125dab663595329063560b33fe7d62839b7a
      https://github.com/openvswitch/ovs/commit/8aaa125dab663595329063560b33fe7d62839b7a
  Author: Daniele Di Proietto <diproiettod at vmware.com>
  Date:   2015-05-18 (Mon, 18 May 2015)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Share emc and fast path output batches.

Until now the exact match cache processing was able to handle only four
megaflows.  The rest of the packets was passed to the megaflow
classifier.

The limit was arbitraly set to four also because the algorithm used to
group packets in output batches didn't perform well with a lot of
megaflows.

After changing the algorithm and after some performance testing it seems
much better just to share the same output batches between the exact
match cache and the megaflow classifier.

Signed-off-by: Daniele Di Proietto <diproiettod at vmware.com>
Acked-by: Pravin B Shelar <pshelar at nicira.com>


Compare: https://github.com/openvswitch/ovs/compare/401aa90e33be...8aaa125dab66


More information about the git mailing list