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



_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to