Is the trace edited? It does not make a lot of sense to me.
Also, if you want to route the packet, why do you go through ip-local? Are you 
trying to do static DNAT? If so, Ole recently added this capability, see 
src/plugins/nat/pnat/

ben

> -----Original Message-----
> From: vpp-dev@lists.fd.io <vpp-dev@lists.fd.io> On Behalf Of Vijay Kumar
> Sent: vendredi 12 février 2021 12:47
> To: Benoit Ganne (bganne) <bga...@cisco.com>
> Cc: vpp-dev <vpp-dev@lists.fd.io>
> Subject: Re: [vpp-dev] Dropped packets when trying to send packet recvd on
> memif over the VirtualEthernet interface
> 
> Hi Benoit,
> 
> The pkt is not destined to a locally configured address in VPP. The pkt
> destination address (as shown in the logs, pkt dest is 20.20.99.215) is
> that of strongswan interface and it is on the same subnet and same vlan as
> that of the VPP interface (20.20.99.99)
> At my plugin, I set the next-node as ip4-local and you can see the trace
> showing the pkt is with ip4-local node but there after it is not going to
> interface-output--->ethernet-output but rather going to drop. Not sure if
> the pkt is malformed
> 
> 
> 
> 01:06:34:500278: memif-input
> 
>   memif: hw_if_index 14 next-index 0
> 
>     slot: ring 0
> 
> 01:06:34:500300: ip4-input-no-checksum
> 
>   unknown 201: 192.168.210.2 -> 192.168.210.1
> 
>     tos 0x00, ttl 64, length 64464, checksum 0x590f dscp CS0 ecn NON_ECN
> 
>     fragment id 0x0000
> 
> 01:06:34:500303: ip4-lookup
> 
>   fib 0 dpo-idx 25 flow hash: 0x00000000
> 
>   unknown 201: 192.168.210.2 -> 192.168.210.1
> 
>     tos 0x00, ttl 64, length 64464, checksum 0x590f dscp CS0 ecn NON_ECN
> 
>     fragment id 0x0000
> 
> 01:06:34:500304: ip4-local
> 
>     unknown 201: 192.168.210.2 -> 192.168.210.1
> 
>       tos 0x00, ttl 64, length 64464, checksum 0x590f dscp CS0 ecn NON_ECN
> 
>       fragment id 0x0000
> 
> 01:06:34:500738: ip4-lookup
> 
>   fib 0 dpo-idx 0 flow hash: 0x00000000
> 
>   UDP: 20.20.99.99 -> 20.20.99.215
> 
>     tos 0x00, ttl 254, length 492, checksum 0x590f (should be 0xcb9e) dscp
> CS0 ecn NON_ECN
> 
>     fragment id 0x0000
> 
>   UDP: 500 -> 500
> 
>     length 472, checksum 0xb45f
> 
> 01:06:34:500739: ip4-drop
> 
>     UDP: 20.20.99.99 -> 20.20.99.215
> 
>       tos 0x00, ttl 254, length 492, checksum 0x590f (should be 0xcb9e)
> dscp CS0 ecn NON_ECN
> 
>       fragment id 0x0000
> 
>     UDP: 500 -> 500
> 
>       length 472, checksum 0xb45f
> 
> 01:06:34:500740: error-drop
> 
>   rx:memif210/0
> 
> 01:06:34:500741: drop
> 
>   ip4-local: unknown ip protocol
> 
> 
> 
> 
> On Fri, Feb 12, 2021 at 3:21 PM Benoit Ganne (bganne) <bga...@cisco.com
> <mailto:bga...@cisco.com> > wrote:
> 
> 
>       Hi,
> 
>       I suppose the packet is destined to one of the VPP interface IPs as
> it ends up on ip4-local.
>       In that case you're looking for punting:
> https://fd.io/docs/vpp/master/gettingstarted/developers/punt.html
> 
>       Best
>       ben
> 
>       > -----Original Message-----
>       > From: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io>  <vpp-
> d...@lists.fd.io <mailto:vpp-dev@lists.fd.io> > On Behalf Of Vijay Kumar
>       > Sent: vendredi 12 février 2021 09:35
>       > To: vpp-dev <vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io> >
>       > Subject: [vpp-dev] Dropped packets when trying to send packet
> recvd on
>       > memif over the VirtualEthernet interface
>       >
>       > Hi,
>       >
>       >
>       > From my application, I received a protocol pkt (IKE) to my graph
> node via
>       > memif.  This  plugin is now supposed to send this pkt out towards
> the
>       > strongswan peer. In the graph node, I had the next node to IP4-
> lookup.
>       > I observed that the pkt doesnt go out. It is dropped in "error-
> drop" graph
>       > node with reason "UNKNOWN PROTOCOL". The previous node for error-
> drop was
>       > ip4-local.
>       >
>       >
>       > The show trace command shows a drop in memif rx interface
>       >
>       >
>       > It looks like we need to put the pkt received on memif to the
> north-south
>       > interface which is the veth interface to be able to send out. This
> is
>       > missing in my code.
>       >
>       >
>       > Is there any way where I can divert the protocol packet received
> on memif
>       > and send it out on the virtual ethernet interface (on the wire)?
>       >
>       >
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18742): https://lists.fd.io/g/vpp-dev/message/18742
Mute This Topic: https://lists.fd.io/mt/80579229/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