[ovs-dev] [PATCH v2] treewide: Use packet batch APIs
u9012063 at gmail.com
Tue Sep 3 20:25:56 UTC 2019
On Tue, Sep 3, 2019 at 10:39 AM Paul Chaignon <paul.chaignon at orange.com> wrote:
> On Tue, Sep 03, 2019 at 06:37PM +0000, William Tu <u9012063 at gmail.com> wrote:
> > On Sun, Sep 01, 2019 at 03:10:05PM +0200, Paul Chaignon wrote:
> > > 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).
> > Looks very interesting, I spent some time learning it.
> Glad you find it interesting! I'm actually trying to practice using it
> myself. (If you have any usage ideas for Open vSwitch, I'm interested; I
> already went through all the treewide patches.)
I think we can create something like scripts/coccinelle in linux kernel,
and try to match/replace some buggy patterns, and occasionally in ovs
we run 'make check-coccinelle'.
Maybe Ilya has more thoughts about what to match?
> > If you have time, can you show us how to run it?
> > I installed coccinelle on ubuntu and I can run on linux kernel
> > make coccicheck MODE=report
> > but for OVS, do we provide the semantic patch below and run
> > it manually?
> I executed the semantic patch below with:
> spatch --sp-file semantic-patch.cocci --very-quiet \
> --dir ./ > output.diff
> Note that there will be some incorrect changes in lib/dp-packet.h which
> you'll need to remove (e.g., Coccinelle tries to use dp_packet_is_eth()
> inside dp_packet_is_eth()). It's possible to avoid that, but afaik, only
> at the cost of a slightly more verbose semantic patch.
Thanks, now I'm able to get it running.
More information about the dev