thanks, Damjan, that is very clear. I checked the device-input and 
ethernet-input code, and yes I totally understand your point.

Two more questions, I can see you spend some time on avf plugin, do you think 
it will eventually become the main stream and replace the dpdk drivers some day?

For vlan tagging, would you like to consider using the HW rx and tx offload to 
optimize the vlan sub-interface?

Reagrds,
Kingwel


-------- 原始邮件 --------
主题: Re: [vpp-dev] ethernet-input on master branch
来自: "Damjan Marion via Lists.Fd.Io" <dmarion=me....@lists.fd.io>
发至: 2019年1月7日 下午5:23
抄送: Kingwel Xie <kingwel....@ericsson.com>


On 5 Jan 2019, at 04:55, Kingwel Xie 
<kingwel....@ericsson.com<mailto:kingwel....@ericsson.com>> wrote:

Hi Damjan,

I noticed you removed the quick path from dpdk-input to ip-input/mpls-input, 
after you merged the patch of ethernet-input optimization. Therefore, all 
packets now have to go through ethernet-input. It would take a few more cpu 
clocks than before.

Please elaborate why making this change.

Dear Kingwei,

Old bypass code beside the fact that it was doing ethertype lookup in the 
device driver code which is architecturally wrong, was broken for some corner 
cases
(i.e. was not doing dMAC check when interface is in promisc mode or interface 
does't do dMAC check at all).
Also bypass code was not dealing properly with VLAN 0 packets.

Keeping things like that means that we will need to maintain separate ethertype 
lookup code i each vpp interface type (i.e. memif, vhost, avf).

With that patch ethertype lookup was moved to one natural place, which is 
ethernet-input node, and as you noticed
there is small cost of doing that (1-2 clocks in my setup).

So with this patch there is small perf hit for L3 untagged traffic, but also 
brings ~10 clocks improvement for L2 traffic. It also
improves L3 performance for memif and vhost-user interfaces.

In addition there is another patch on top of this one which improves tagged 
packet handling and reduces cost of VLAN single/double lookup from 70 clocks to 
less than 30.

Hope this explains,

--
Damjan

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#11851): https://lists.fd.io/g/vpp-dev/message/11851
Mute This Topic: https://lists.fd.io/mt/28940805/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to