From: Greg Rose <gregory.v.rose@intel.com>
To: Alexander Duyck <alexander.h.duyck@intel.com>
Cc: e1000-devel@lists.sourceforge.net,
Netdev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Ding Tianhong <dingtianhong@huawei.com>
Subject: Re: [PATCH 01/21] net: slight optimization of addr compare for some modules
Date: Mon, 23 Dec 2013 10:08:40 -0800 [thread overview]
Message-ID: <20131223100840.000014a5@unknown> (raw)
In-Reply-To: <52B870E5.3020708@intel.com>
On Mon, 23 Dec 2013 09:20:37 -0800
Alexander Duyck <alexander.h.duyck@intel.com> wrote:
> On 12/22/2013 09:09 PM, Ding Tianhong wrote:
> > Use the recently added and possibly more efficient
> > ether_addr_equal_unaligned to instead of memcmp.
> >
> > Cc: "David S. Miller" <davem@davemloft.net>
> > Cc: netdev@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > Cc: e1000-devel@lists.sourceforge.net
> > Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
> > ---
> > drivers/net/bonding/bond_3ad.c | 2 +-
> > drivers/net/ethernet/3com/3c509.c | 3 +--
> > drivers/net/ethernet/broadcom/bnx2x/bnx2x_sp.c | 10
> > ++++------ drivers/net/ethernet/broadcom/bnx2x/bnx2x_sriov.c |
> > 2 +- drivers/net/ethernet/broadcom/bnx2x/bnx2x_vfpf.c | 2 +-
> > drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c | 2 +-
> > drivers/net/ethernet/chelsio/cxgb3/l2t.c | 2 +-
> > drivers/net/ethernet/cisco/enic/enic_pp.c | 2 +-
> > drivers/net/ethernet/emulex/benet/be_main.c | 2 +-
> > drivers/net/ethernet/intel/igbvf/netdev.c | 2 +-
> > drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 3 +--
> > drivers/net/ethernet/mellanox/mlx4/en_netdev.c | 4 ++--
> > drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 2 +-
> > drivers/net/ethernet/micrel/ksz884x.c | 9
> > ++++----- drivers/net/ethernet/neterion/vxge/vxge-main.c |
> > 2 +- drivers/net/ethernet/packetengines/yellowfin.c | 8
> > ++------ drivers/net/ethernet/qlogic/netxen/netxen_nic_hw.c | 2
> > +- drivers/net/ethernet/qlogic/qlcnic/qlcnic_hw.c | 4 ++--
> > drivers/net/ethernet/qlogic/qlcnic/qlcnic_io.c | 4 ++--
> > drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c | 4 ++--
> > drivers/net/ethernet/renesas/sh_eth.c | 2 +-
> > drivers/net/ethernet/seeq/sgiseeq.c | 2 +-
> > drivers/net/ethernet/sun/sunvnet.c | 2 +-
> > drivers/net/ethernet/ti/cpsw_ale.c | 2 +-
> > drivers/net/fddi/skfp/fplustm.c | 3 ++-
> > drivers/net/plip/plip.c | 2 +-
> > net/caif/cfrfml.c | 2 +-
> > 27 files changed, 39 insertions(+), 47 deletions(-)
>
> What is it you are trying to optimize for, size or speed? Most of
> these calls are in slow path. Replacing the memcmp with an inline
> operation may provide little to no gain in terms of speed and in many
> cases as you might actually be increasing the resultant driver size.
>
> Also I would recommend reviewing the addresses you are comparing. It
> is likely that you could use ether_addr_equal or compare_ether_addr
> in many cases as I suspect a number of spots are using 16b aligned
> MAC addresses for both operands.
User ether_addr_equal. compare_ether_addr was recently removed from
the upstream kernel - as I discovered to my chagrin late one
recent Friday evening while trying to get a build done.
- Greg
>
> Thanks,
>
> Alex
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit http://communities.intel.com/community/wired
next prev parent reply other threads:[~2013-12-23 18:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-23 5:09 [PATCH 01/21] net: slight optimization of addr compare for some modules Ding Tianhong
2013-12-23 17:20 ` [E1000-devel] " Alexander Duyck
2013-12-23 18:08 ` Greg Rose [this message]
2013-12-24 1:44 ` Ding Tianhong
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=20131223100840.000014a5@unknown \
--to=gregory.v.rose@intel.com \
--cc=alexander.h.duyck@intel.com \
--cc=davem@davemloft.net \
--cc=dingtianhong@huawei.com \
--cc=e1000-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).