Re: [ovs-dev] [PATCH 5/7] dpif-netdev: Use memcpy() to initialize pkt_metadata.

2015-05-18 Thread Daniele Di Proietto
On 15/05/2015 20:50, "Pravin Shelar" wrote: >On Thu, Apr 23, 2015 at 11:40 AM, Daniele Di Proietto > wrote: >> Initializing the dp_packet's metadata can be a hot spot, especially >> for very simple pipelines. Therefore improving the code here can >> sometimes make a difference. >> >> Using mem

Re: [ovs-dev] [PATCH 5/7] dpif-netdev: Use memcpy() to initialize pkt_metadata.

2015-05-15 Thread Pravin Shelar
On Thu, Apr 23, 2015 at 11:40 AM, Daniele Di Proietto wrote: > Initializing the dp_packet's metadata can be a hot spot, especially > for very simple pipelines. Therefore improving the code here can > sometimes make a difference. > > Using memcpy instead of a plain assignment helps GCC and clang g

[ovs-dev] [PATCH 5/7] dpif-netdev: Use memcpy() to initialize pkt_metadata.

2015-04-23 Thread Daniele Di Proietto
Initializing the dp_packet's metadata can be a hot spot, especially for very simple pipelines. Therefore improving the code here can sometimes make a difference. Using memcpy instead of a plain assignment helps GCC and clang generate faster code. Here's a comparison of the compiler generated code