Thanks Damjan. I will reanalyze my approach. Thanks, Nitin
> On 23-Sep-2018, at 16:29, Damjan Marion <dmar...@me.com> wrote: > > External Email > > Dear Nitin, > >> On 22 Sep 2018, at 20:30, Nitin Saxena <nitin.sax...@cavium.com> wrote: >> >> Hi Damjan/Dave. >> >>> You will end up with layering violation and bloatig driver code. Please >>> dont go there. >> Ok. My motivation is the error packet should be dropped at the earliest. i.e >> - In device-input node, if interface is not in L2 brdge or in L2XC config >> then drop all error packets in “device-input” node itself. Except TTL >> expiry, all ipv4-input checks drops the packet. > > Device input node should not drop packets. However it can provide hint (like > we do with checksum today) so next node can deal with it faster. > Few reasons why doing that is bad idea: > - if packet have errors, it should still be subject of port mirroring (SPAN) > - in some cases such packet should be sent to punt path > >> - If interface is in L2 bridge or L2XC config, packet can take L2 path and >> ipv4-input stays in that path > > Actually right now I'm working on completely decoupling device driver code > from l2/l3 path selection/ethertype lookup. > So that logic is likely be removed from device driver. > >> >>> No, it is not, ip4 packet may also go to l2 path. >> Do you mean to say that in some cases L2 nodes are called after ip4-input? >> Could you please elaborate? “show vlib graph” output do not give any hint. > > no, see above > > >> >>> Ip4-input is also punt node, responsible for sending specific packets to >>> the control plane. Iz should stay in the path… >> I fail to find the punt code that call ip4-input. Could you please point me >> to the code? > > see src/vnet/ip/ip4_input.[ch] > > -- > Damjan
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#10614): https://lists.fd.io/g/vpp-dev/message/10614 Mute This Topic: https://lists.fd.io/mt/25907990/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-