On Thu, 2018-05-03 at 13:32 -0400, David Miller wrote:
> From: Paolo Abeni <pab...@redhat.com>
> Date: Thu,  3 May 2018 11:35:35 +0200
> 
> > When the transport header is not available, skb_probe_transport_header()
> > resorts to fully dissect the flow keys, even if it only needs the
> > ransport offset. We can obtain the latter using a simpler flow dissector -
> > flow_keys_buf_dissector - and a smaller struct for key storage.
> > 
> > The above gives ~50% performance improvement in micro benchmarking around
> > skb_probe_transport_header(), mostly due to the smaller memset. Small, but
> > measurable improvement is measured also in macro benchmarking - raw xmit
> > tput from a VM.
> > 
> > Signed-off-by: Paolo Abeni <pab...@redhat.com>
> 
> Please make this optimization generally, then every driver using
> eth_get_headlen() (11 or so) will get the same improvement, for all
> traffic!

Sure! I though about sending a follow-up patch for other
flow_keys_buf_dissector users, but if you prefer a single patch, I'm
fine with your version (just give me a little time tomorrow to test it)

Please let me know,

Paolo

Reply via email to