Skip to contentSkip to conversation

ieee1588fwd.c implementation

DISCUSSION Stefan Binna 2 participants 10 messages Aug 12, 2015 – Aug 18, 2015

lore
Share & tools
lore
#0 lore raw

Hi,

I'm currently trying to implement the ieee1588fwd.c function into my testpmd programm. I'm using DPDK-2.0.0.

Is there any installation guide for ieee1588fwd implementation, i.e. any source code where the function is already implemented? I already changed the CONFIG_RTE_LIBRTE_IEEE1588=y flag in the configuration file and rebuilt the testpmd function.

Any help is appreciated.

Thanks very much.
Kind regards, Stefan.

#1 lore raw
Quoted 7 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Stefan Binna
Sent: Wednesday, August 12, 2015 5:01 PM
To: [email protected]
Subject: [dpdk-dev] ieee1588fwd.c implementation

Quoted 7 lines

I'm currently trying to implement the ieee1588fwd.c function into my testpmd programm. I'm using DPDK-2.0.0.

Is there any installation guide for ieee1588fwd implementation, i.e. any source code where the function is already implemented?
I already changed the CONFIG_RTE_LIBRTE_IEEE1588=y flag in the configuration file and rebuilt the testpmd function.

Hi Stefan,

What exactly is the issue?

John.

#2 lore raw

Hi John,

thanks for the quick response.

I don't understand how to implement ieee1588fwd. Is there any manual, sample application or similar available? Or do I have to modify the testpmd.c file by myself? I don't really know how to implement the code available in ieee1588fwd.c.

Thanks, Stefan.

Am 12.08.2015 um 18:24 schrieb Mcnamara, John:

Quoted 19 lines
Quoted 7 lines

-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Stefan Binna
Sent: Wednesday, August 12, 2015 5:01 PM
To: [email protected]
Subject: [dpdk-dev] ieee1588fwd.c implementation

Quoted 7 lines

I'm currently trying to implement the ieee1588fwd.c function into my testpmd programm. I'm using DPDK-2.0.0.

Is there any installation guide for ieee1588fwd implementation, i.e. any source code where the function is already implemented?
I already changed the CONFIG_RTE_LIBRTE_IEEE1588=y flag in the configuration file and rebuilt the testpmd function.

Hi Stefan,

What exactly is the issue?

John.

#3 lore raw
Quoted 6 lines

-----Original Message-----
From: Stefan Binna [mailto:[email protected]]
Sent: Wednesday, August 12, 2015 5:42 PM
To: Mcnamara, John; [email protected]
Subject: Re: [dpdk-dev] ieee1588fwd.c implementation

Quoted 7 lines

Hi John,

I don't understand how to implement ieee1588fwd. Is there any manual, sample application or similar available?
Or do I have to modify the testpmd.c file by myself? I don't really know how to implement the code available in ieee1588fwd.c.

Hi Stefan,

The steps you did are correct:

* Enable CONFIG_RTE_LIBRTE_IEEE1588=y in the config.
* Compile the testpmd application (this happens as part of the default compile):

make -j T=x86_64-native-linuxapp-gcc install

Then you can run testpmd with ieee1588 forwarding on as follows (or similar. Adjust coremask to suit):

    sudo ./x86_64-native-linuxapp-gcc/app/testpmd -c 300 -n 4 \
          --  --port-topology=chained --txqflags=0 --forward-mode=ieee1588

Note:
The --txqflags=0 is required to ensure ieee1588 support in the "full featured" TX path.

If you send the correct l2 ptp packets they should generate a text output from testpmd

Add '-i' after '--' to enter interactive mode in testpmd.

You can also set IEEE1588 mode from within testpmd as follows:

testpmd> set fwd ieee1588
Set ieee1588 packet forwarding mode

Note: if you don't see the ieee1588 mode it usually means that CONFIG_RTE_LIBRTE_IEEE1588 wasn't configured.

Best of luck,

John.

#4 lore raw

Hi John,

thanks very much for the big help :)

I'll try it tomorrow and if I run into any problems I'll contact you again.

Best regards,
Stefan.

Am 12.08.2015 um 19:09 schrieb Mcnamara, John:

Quoted 45 lines
Quoted 6 lines

-----Original Message-----
From: Stefan Binna [mailto:[email protected]]
Sent: Wednesday, August 12, 2015 5:42 PM
To: Mcnamara, John; [email protected]
Subject: Re: [dpdk-dev] ieee1588fwd.c implementation

Quoted 7 lines

Hi John,

I don't understand how to implement ieee1588fwd. Is there any manual, sample application or similar available?
Or do I have to modify the testpmd.c file by myself? I don't really know how to implement the code available in ieee1588fwd.c.

Hi Stefan,

The steps you did are correct:

* Enable CONFIG_RTE_LIBRTE_IEEE1588=y in the config.
* Compile the testpmd application (this happens as part of the default compile):

make -j T=x86_64-native-linuxapp-gcc install

Then you can run testpmd with ieee1588 forwarding on as follows (or similar. Adjust coremask to suit):

     sudo ./x86_64-native-linuxapp-gcc/app/testpmd -c 300 -n 4 \
           --  --port-topology=chained --txqflags=0 --forward-mode=ieee1588

Note:
The --txqflags=0 is required to ensure ieee1588 support in the "full featured" TX path.

If you send the correct l2 ptp packets they should generate a text output from testpmd

Add '-i' after '--' to enter interactive mode in testpmd.

You can also set IEEE1588 mode from within testpmd as follows:

testpmd> set fwd ieee1588
Set ieee1588 packet forwarding mode

Note: if you don't see the ieee1588 mode it usually means that CONFIG_RTE_LIBRTE_IEEE1588 wasn't configured.

Best of luck,

John.

#5 lore raw

Hi John,

I got PTP working and was able to transmit a valid PTPv2 packet over the DPDK network card.

Every time a PTP packet arrives I get following message in the testpmd application: Port 0 Received PTP packet not filtered by hardware

However, the hardware does not change the timestamp, when I check the received packet.

How can I enable this feature?

Thanks very much.
Kind regards, Stefan.

Am 12.08.2015 um 19:32 schrieb Stefan Binna:

Quoted 59 lines

Hi John,

thanks very much for the big help :)

I'll try it tomorrow and if I run into any problems I'll contact you again.

Best regards,
Stefan.

Am 12.08.2015 um 19:09 schrieb Mcnamara, John:

Quoted 48 lines
Quoted 6 lines

-----Original Message-----
From: Stefan Binna [mailto:[email protected]]
Sent: Wednesday, August 12, 2015 5:42 PM
To: Mcnamara, John; [email protected]
Subject: Re: [dpdk-dev] ieee1588fwd.c implementation

Quoted 7 lines

Hi John,

I don't understand how to implement ieee1588fwd. Is there any manual, sample application or similar available?
Or do I have to modify the testpmd.c file by myself? I don't really know how to implement the code available in ieee1588fwd.c.

Hi Stefan,

The steps you did are correct:

* Enable CONFIG_RTE_LIBRTE_IEEE1588=y in the config.
* Compile the testpmd application (this happens as part of the
default compile):

make -j T=x86_64-native-linuxapp-gcc install

Then you can run testpmd with ieee1588 forwarding on as follows (or similar. Adjust coremask to suit):

     sudo ./x86_64-native-linuxapp-gcc/app/testpmd -c 300 -n 4 \
           --  --port-topology=chained --txqflags=0 

--forward-mode=ieee1588

Note:
The --txqflags=0 is required to ensure ieee1588 support in the
"full featured" TX path.

If you send the correct l2 ptp packets they should generate a text output from testpmd

Add '-i' after '--' to enter interactive mode in testpmd.

You can also set IEEE1588 mode from within testpmd as follows:

testpmd> set fwd ieee1588
Set ieee1588 packet forwarding mode

Note: if you don't see the ieee1588 mode it usually means that CONFIG_RTE_LIBRTE_IEEE1588 wasn't configured.

Best of luck,

John.

#6 lore raw
Quoted 11 lines

-----Original Message-----
From: Stefan Binna [mailto:[email protected]]
Sent: Thursday, August 13, 2015 12:27 PM
To: Mcnamara, John; [email protected]
Subject: Re: [dpdk-dev] ieee1588fwd.c implementation

I got PTP working and was able to transmit a valid PTPv2 packet over the DPDK network card.

Every time a PTP packet arrives I get following message in the testpmd
application: Port 0 Received PTP packet not filtered by hardware

Hi,

That may be due to 1 or 2 different issues:

1. You are using a NIC that doesn't support PTP timesyncing. What NIC are you using?
2. You are using a Fortville NIC but don't have the latest code from dpdk.org.

Quoted 2 lines

However, the hardware does not change the timestamp, when I check the received packet.

You will need to address the above issue first, but just to be clear, the NIC doesn't update the timestamp in the PTP packet. It sets a flag to say that the packet is a L2 PTP packet and that the timestamp of its arrival is available for reading.

John

#7 lore raw

Hi,

I'm using the Intel NIC 82547L.
Furthermore I'm using DPDK-2.0.0, the last stable download from the official homepage.

Is there any method to "measure" the time the NIC takes to process the packet from the input port (e.g. port 0) to the output port (port 1)? Should be around 8 to 40 microseconds depending on the packet size?

Thanks. Best regards,
Stefan.

Am 14.08.2015 um 18:04 schrieb Mcnamara, John:

Quoted 26 lines
Quoted 11 lines

-----Original Message-----
From: Stefan Binna [mailto:[email protected]]
Sent: Thursday, August 13, 2015 12:27 PM
To: Mcnamara, John; [email protected]
Subject: Re: [dpdk-dev] ieee1588fwd.c implementation

I got PTP working and was able to transmit a valid PTPv2 packet over the DPDK network card.

Every time a PTP packet arrives I get following message in the testpmd
application: Port 0 Received PTP packet not filtered by hardware

Hi,

That may be due to 1 or 2 different issues:

1. You are using a NIC that doesn't support PTP timesyncing. What NIC are you using?
2. You are using a Fortville NIC but don't have the latest code from dpdk.org.

Quoted 2 lines

However, the hardware does not change the timestamp, when I check the received packet.

You will need to address the above issue first, but just to be clear, the NIC doesn't update the timestamp in the PTP packet. It sets a flag to say that the packet is a L2 PTP packet and that the timestamp of its arrival is available for reading.

John

#8 lore raw
Quoted 8 lines

-----Original Message-----
From: Stefan Binna [mailto:[email protected]]
Sent: Monday, August 17, 2015 1:48 AM
To: Mcnamara, John; [email protected]
Subject: Re: [dpdk-dev] ieee1588fwd.c implementation

Hi,

Quoted 7 lines

I'm using the Intel NIC 82547L.
Furthermore I'm using DPDK-2.0.0, the last stable download from the official homepage.

Is there any method to "measure" the time the NIC takes to process the packet from the input port (e.g. port 0) to the output port (port 1)? Should be around 8 to 40 microseconds depending on the packet size?

Hi Stefan,

The RX/TX callbacks sample application looks closer to what you are looking for:

"The RX/TX Callbacks sample application is a packet forwarding application that demonstrates the use of user defined callbacks on received and transmitted packets. The application performs a simple latency check, using callbacks, to determine the time packets spend within the application".

http://dpdk.org/doc/guides/sample_app_ug/rxtx_callbacks.html

http://dpdk.org/browse/dpdk/tree/examples/rxtx_callbacks/main.c

John.

#9 lore raw

Hi,

alright, I'll look it up.

Thanks for your help.

Kind regards,
Stefan.

Am 17.08.2015 um 16:21 schrieb Mcnamara, John:

Quoted 30 lines
Quoted 8 lines

-----Original Message-----
From: Stefan Binna [mailto:[email protected]]
Sent: Monday, August 17, 2015 1:48 AM
To: Mcnamara, John; [email protected]
Subject: Re: [dpdk-dev] ieee1588fwd.c implementation

Hi,

Quoted 7 lines

I'm using the Intel NIC 82547L.
Furthermore I'm using DPDK-2.0.0, the last stable download from the official homepage.

Is there any method to "measure" the time the NIC takes to process the packet from the input port (e.g. port 0) to the output port (port 1)? Should be around 8 to 40 microseconds depending on the packet size?

Hi Stefan,

The RX/TX callbacks sample application looks closer to what you are looking for:

"The RX/TX Callbacks sample application is a packet forwarding application that demonstrates the use of user defined callbacks on received and transmitted packets. The application performs a simple latency check, using callbacks, to determine the time packets spend within the application".

http://dpdk.org/doc/guides/sample_app_ug/rxtx_callbacks.html

http://dpdk.org/browse/dpdk/tree/examples/rxtx_callbacks/main.c

John.