Re: [vpp-dev] Dropped packets when trying to send packet recvd on memif over the VirtualEthernet interface

2021-02-12 Thread Benoit Ganne (bganne) via lists.fd.io
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  On Behalf Of Vijay Kumar
> Sent: vendredi 12 février 2021 12:47
> To: Benoit Ganne (bganne) 
> Cc: vpp-dev 
> 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 0x
> 
> 01:06:34:500303: ip4-lookup
> 
>   fib 0 dpo-idx 25 flow hash: 0x
> 
>   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 0x
> 
> 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 0x
> 
> 01:06:34:500738: ip4-lookup
> 
>   fib 0 dpo-idx 0 flow hash: 0x
> 
>   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 0x
> 
>   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 0x
> 
> 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)   > 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    d...@lists.fd.io  > On Behalf Of Vijay Kumar
>   > Sent: vendredi 12 février 2021 09:35
>   > To: vpp-dev 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]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] Make test failures on ubuntu-20.04 AARCH64

2021-02-12 Thread Dave Wallace

Both aarch64 & x86_64 jobs completed successfully:

https://jenkins.fd.io/sandbox/job/daw_30773-vpp-verify-master-ubuntu2004-aarch64/5/
https://jenkins.fd.io/sandbox/job/daw_30773-vpp-verify-master-ubuntu2004-x86_64/4/

Thanks,
-daw-

On 2/12/2021 8:50 AM, Dave Wallace via lists.fd.io wrote:

Great! I will retest with the latest changes and report back.

Thanks,
-daw-

On 2/12/2021 8:41 AM, Benoit Ganne (bganne) wrote:

Hi Dave,


Your patch fixed the issue [0] (x86_64 passes too)!

Great! I updated it with more fixes and debug 
checks:https://gerrit.fd.io/r/c/vpp/+/31240  and abandoned the change 31241 
(which I have merged with 31240 instead).

Best
ben


Thanks,
-daw-

[0]https://jenkins.fd.io/sandbox/job/daw_30773-vpp-verify-master-
ubuntu2004-aarch64/4/
 https://jenkins.fd.io/sandbox/job/daw_30773-vpp-verify-master-
ubuntu2004-x86_64/3/









-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18741): https://lists.fd.io/g/vpp-dev/message/18741
Mute This Topic: https://lists.fd.io/mt/80495347/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] Make test failures on ubuntu-20.04 AARCH64

2021-02-12 Thread Dave Wallace

Great! I will retest with the latest changes and report back.

Thanks,
-daw-

On 2/12/2021 8:41 AM, Benoit Ganne (bganne) wrote:

Hi Dave,


Your patch fixed the issue [0] (x86_64 passes too)!

Great! I updated it with more fixes and debug checks: 
https://gerrit.fd.io/r/c/vpp/+/31240 and abandoned the change 31241 (which I 
have merged with 31240 instead).

Best
ben


Thanks,
-daw-

[0] https://jenkins.fd.io/sandbox/job/daw_30773-vpp-verify-master-
ubuntu2004-aarch64/4/
 https://jenkins.fd.io/sandbox/job/daw_30773-vpp-verify-master-
ubuntu2004-x86_64/3/






-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18740): https://lists.fd.io/g/vpp-dev/message/18740
Mute This Topic: https://lists.fd.io/mt/80495347/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] Make test failures on ubuntu-20.04 AARCH64

2021-02-12 Thread Benoit Ganne (bganne) via lists.fd.io
Hi Dave,

> Your patch fixed the issue [0] (x86_64 passes too)!

Great! I updated it with more fixes and debug checks: 
https://gerrit.fd.io/r/c/vpp/+/31240 and abandoned the change 31241 (which I 
have merged with 31240 instead).

Best
ben

> Thanks,
> -daw-
> 
> [0] https://jenkins.fd.io/sandbox/job/daw_30773-vpp-verify-master-
> ubuntu2004-aarch64/4/
> https://jenkins.fd.io/sandbox/job/daw_30773-vpp-verify-master-
> ubuntu2004-x86_64/3/
> 



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18739): https://lists.fd.io/g/vpp-dev/message/18739
Mute This Topic: https://lists.fd.io/mt/80495347/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] Make test failures on ubuntu-20.04 AARCH64

2021-02-12 Thread Dave Wallace

Ben,

Your patch fixed the issue [0] (x86_64 passes too)!

Thanks,
-daw-

[0] 
https://jenkins.fd.io/sandbox/job/daw_30773-vpp-verify-master-ubuntu2004-aarch64/4/

https://jenkins.fd.io/sandbox/job/daw_30773-vpp-verify-master-ubuntu2004-x86_64/3/

On 2/11/2021 3:06 PM, Dave Wallace via lists.fd.io wrote:

Ben,

Excellent debugging work!
I will rebase my gerrit change onto yours, retest in the Jenkins 
Sandbox, and report back.


Thanks,
-daw-

On 2/11/21 2:18 PM, Benoit Ganne (bganne) wrote:

Hi Dave,


There are still 6 ikev2 test failures from this test run that need to be
resolved.

I identified the issue: undefined behaviour + aggressive gcc optimization.
The tentative fix is here:https://gerrit.fd.io/r/c/vpp/+/31240

Note that for this to happen, you need both:
  - compile with gcc
  - use gcc memcpy builtin
This is the case for ARM64 but not x86, as we do not use gcc memcpy builtin on 
x86.

It looks like there are other cases where we call memcpy with NULL 
pointers:https://gerrit.fd.io/r/c/vpp/+/31241
I am going to chase them down.

Best
ben









-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18738): https://lists.fd.io/g/vpp-dev/message/18738
Mute This Topic: https://lists.fd.io/mt/80495347/21656
Group Owner: vpp-dev+ow...@lists.fd.io
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] Dropped packets when trying to send packet recvd on memif over the VirtualEthernet interface

2021-02-12 Thread Vijay Kumar
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 0x

01:06:34:500303: ip4-lookup

  fib 0 dpo-idx 25 flow hash: 0x

  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 0x

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 0x

01:06:34:500738: ip4-lookup

  fib 0 dpo-idx 0 flow hash: 0x

  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 0x

  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 0x

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) 
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  On Behalf Of Vijay Kumar
> > Sent: vendredi 12 février 2021 09:35
> > To: vpp-dev 
> > 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 (#18737): https://lists.fd.io/g/vpp-dev/message/18737
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]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [vpp-dev] Dropped packets when trying to send packet recvd on memif over the VirtualEthernet interface

2021-02-12 Thread Benoit Ganne (bganne) via lists.fd.io
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  On Behalf Of Vijay Kumar
> Sent: vendredi 12 février 2021 09:35
> To: vpp-dev 
> 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 (#18736): https://lists.fd.io/g/vpp-dev/message/18736
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]
-=-=-=-=-=-=-=-=-=-=-=-



[vpp-dev] Dropped packets when trying to send packet recvd on memif over the VirtualEthernet interface

2021-02-12 Thread Vijay Kumar
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 (#18735): https://lists.fd.io/g/vpp-dev/message/18735
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]
-=-=-=-=-=-=-=-=-=-=-=-