lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <OS3P286MB229533DAC2CF9CE98C54B428F5D89@OS3P286MB2295.JPNP286.PROD.OUTLOOK.COM>
Date:   Wed, 8 Feb 2023 11:08:44 +0800
From:   Eddy Tao <taoyuan_eddy@...mail.com>
To:     Simon Horman <simon.horman@...igine.com>
Cc:     netdev@...r.kernel.org, Pravin B Shelar <pshelar@....org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>, dev@...nvswitch.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v1 1/1] net: openvswitch: remove unnecessary vlan
 init in key_extract

Hi, Simon:

     Thanks for looking into this. by looking into the compiled 
instructions, i am convinced the patch is logically correct but not help 
in performance, and it adds complexity,

Below function is actually optimized to one movq instruction with no 
special -O settings on my centos8, which seems good enough for me

static void clear_vlan(struct sw_flow_key *key)
{
     key->eth.vlan.tci = 0;
     key->eth.vlan.tpid = 0;
     key->eth.cvlan.tci = 0;
     key->eth.cvlan.tpid = 0;
}

optimized to movq   $0x0,0x158(%rbx)

I am withdrawing this patch

About your comment below, since it is after the parse_vlan handling, the 
code looks fine and does not affect the logic of the patch

 >>I think you missed the following case further down: >>>>if 
(unlikely(key->eth.type == htons(0))) Have a great day

eddy



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ