[ovs-git] [openvswitch/ovs] 940ac2: treewide: Use packet batch APIs

Paul Chaignon noreply at github.com
Thu Sep 26 00:10:08 UTC 2019


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 940ac2ce880349bf4d3bcb9c0571dbedadc8d769
      https://github.com/openvswitch/ovs/commit/940ac2ce880349bf4d3bcb9c0571dbedadc8d769
  Author: Paul Chaignon <paul.chaignon at orange.com>
  Date:   2019-09-25 (Wed, 25 Sep 2019)

  Changed paths:
    M lib/dpif-netdev.c
    M lib/flow.c
    M lib/netdev-afxdp.c
    M lib/netdev-dpdk.c
    M lib/netdev-dummy.c
    M lib/packets.c
    M lib/pcap-file.c

  Log Message:
  -----------
  treewide: Use packet batch APIs

This patch replaces direct accesses to dp_packet_batch and dp_packet
internal components by the appropriate API calls.  It extends commit
1270b6e52 (treewide: Wider use of packet batch APIs).

This patch was generated using the following semantic patch (cf.
http://coccinelle.lip6.fr).

// <smpl>
@ dp_packet @
struct dp_packet_batch *b1;
struct dp_packet_batch b2;
struct dp_packet *p;
expression e;
@@

(
- b1->packets[b1->count++] = p;
+ dp_packet_batch_add(b1, p);
|
- b2.packets[b2.count++] = p;
+ dp_packet_batch_add(&b2, p);
|
- p->packet_type == htonl(PT_ETH)
+ dp_packet_is_eth(p)
|
- p->packet_type != htonl(PT_ETH)
+ !dp_packet_is_eth(p)
|
- b1->count == 0
+ dp_packet_batch_is_empty(b1)
|
- !b1->count
+ dp_packet_batch_is_empty(b1)
|
  b1->count = e;
|
  b1->count++
|
  b2.count = e;
|
  b2.count++
|
- b1->count
+ dp_packet_batch_size(b1)
|
- b2.count
+ dp_packet_batch_size(&b2)
)
// </smpl>

Signed-off-by: Paul Chaignon <paul.chaignon at orange.com>
Signed-off-by: Ben Pfaff <blp at ovn.org>




More information about the git mailing list