From: David Miller <davem@davemloft.net>
To: lirongqing@baidu.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH][net-next] net: slightly optimize eth_type_trans
Date: Thu, 15 Nov 2018 15:11:31 -0800 (PST) [thread overview]
Message-ID: <20181115.151131.596213640354724307.davem@davemloft.net> (raw)
In-Reply-To: <1542072871-21208-1-git-send-email-lirongqing@baidu.com>
From: Li RongQing <lirongqing@baidu.com>
Date: Tue, 13 Nov 2018 09:34:31 +0800
> netperf udp stream shows that eth_type_trans takes certain cpu,
> so adjust the mac address check order, and firstly check if it
> is device address, and only check if it is multicast address
> only if not the device address.
>
> After this change:
> To unicast, and skb dst mac is device mac, this is most of time
> reduce a comparision
> To unicast, and skb dst mac is not device mac, nothing change
> To multicast, increase a comparision
>
> Before:
> 1.03% [kernel] [k] eth_type_trans
>
> After:
> 0.78% [kernel] [k] eth_type_trans
>
> Signed-off-by: Zhang Yu <zhangyu31@baidu.com>
> Signed-off-by: Li RongQing <lirongqing@baidu.com>
Applied.
next prev parent reply other threads:[~2018-11-16 9:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-13 1:34 [PATCH][net-next] net: slightly optimize eth_type_trans Li RongQing
2018-11-15 23:11 ` David Miller [this message]
2018-11-17 22:37 ` Eric Dumazet
2018-11-18 0:51 ` David Miller
2018-11-18 1:19 ` Eric Dumazet
2018-11-18 4:06 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181115.151131.596213640354724307.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=lirongqing@baidu.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox