IOAM trace timestamp is 4 bytes. So it always returns the least significant 4 
bytes of milli, micro or nanoseconds specified by trace-tsp.

We have not yet implemented the long format timestamps yet.



For performance, the IOAM trace timestamp is populated using cpu time stamp 
counter and initial unix epoch recorded at init(code snippet [1]).

Are you creating a network of containers running VPP to try this? We have seen 
that with VMs and Containers running on systems with multiple CPU cores we 
don't get the trace with time perfectly synchronized. If you wish to, try 
replacing [1] to populate the timestamp using unix_time_now (replace [1] with 
[2]) that should give you synchronized results in container/VM environment.





Thanks,

Shwetha



1. src/plugins/ioam/encap/ip6_ioam_trace.c

if (trace->trace_hdr.ioam_trace_type & BIT_TIMESTAMP)                           
                                                                                
                                            {

                                                                                
                                                                                
                                          /* Send least significant 32 bits */  
                                                                                
                                                                                
    f64 time_f64 =

            (f64) (((f64) hm->unix_time_0) +

                   (vlib_time_now (hm->vlib_main) - hm->vlib_time_0));



time_u64.as_u64 = time_f64 * trace_tsp_mul[profile->trace_tsp];

*elt = clib_host_to_net_u32 (time_u64.as_u32[0]);

elt++;

}



2.

if (trace->trace_hdr.ioam_trace_type & BIT_TIMESTAMP)                           
                                                                                
                                            {

f64 time_f64 = unix_time_now();

time_u64.as_u64 = time_f64 * trace_tsp_mul[profile->trace_tsp];

*elt = clib_host_to_net_u32 (time_u64.as_u32[0]);

elt++;

}



On 7/10/18, 1:11 PM, "井上 勝晴" <i-masah...@netone.co.jp> wrote:



    Hi Shwetha,



    I found that dump message has something strange.

    I configured my system at "trace-tsp 2 (microseconds)". But dump was 
followings.



        [0] ttl 0xfc node id 0x4 ts 0x4c5470ee

        [1] ttl 0xfd node id 0x3 ts 0x4c4cd843

        [2] ttl 0xfe node id 0x1 ts 0x4c562e52



    0x4c5470ee (hex) = 1280602350 (decimal)

    0x4c4cd843 (hex) = 1280104515 (decimal)

    0x4c562e52 (hex) = 1280716370 (decimal)



    1)

    Each value is only 10 digits.

    I think it must be 16 digits when it is configured at "trace-tsp 2 
(microseconds)".

    I tried millisecond and nanoseconds configuration also, but results were 
same.



    2)

    Time series seemed to be incorrect.

    Actually, node1 was a first router which got and forwarded packets in my 
system. But node1's timestamp was not the oldest one.



    I'd greatly appreciate any comment or suggestions you might have.



    Regards,

    Masaharu Inoue







    From: Shwetha Bhandari (shwethab) [mailto:shwet...@cisco.com]

    Sent: Thursday, July 05, 2018 1:23 PM

    To: HADI SHAIKHZAKER <h-za...@netone.co.jp>; vpp-dev@lists.fd.io

    Cc: 井上 勝晴 <i-masah...@netone.co.jp>

    Subject: Re: [vpp-dev] about iOAM configuration



    Hi Hadi,

    Good to know!

    Classification is needed for encap and decap not for transit processing.

    Transit processes the options if present. Transit nodes only need node-id 
and application data if trace option includes it.

    Thanks,

    Shwetha



    From: HADI SHAIKHZAKER <mailto:h-za...@netone.co.jp>

    Date: Thursday, July 5, 2018 at 7:57 AM

    To: Shwetha bhandari <mailto:shwet...@cisco.com>, 
"mailto:vpp-dev@lists.fd.io"; <mailto:vpp-dev@lists.fd.io>

    Cc: 井上 勝晴 <mailto:i-masah...@netone.co.jp>

    Subject: RE: [vpp-dev] about iOAM configuration



    Just updating.

    Configuration in the LXC setup works fine.

    Now all the three nodes (encap, transit and decap) works fine.

        [0] ttl 0x3e node id 0x3 ts 0x1b0364ae

        [1] ttl 0x3f node id 0x2 ts 0x1b0c2f8d

        [2] ttl 0x40 node id 0x1 ts 0x1b04e395

    Thank you so much again Shewtha.



    Regards,

    Hadi



    From: HADI SHAIKHZAKER

    Sent: Thursday, July 05, 2018 10:01 AM

    To: 'Shwetha Bhandari (shwethab)' <mailto:shwet...@cisco.com>; 
mailto:vpp-dev@lists.fd.io

    Cc: 井上 勝晴 <mailto:i-masah...@netone.co.jp>

    Subject: RE: [vpp-dev] about iOAM configuration



    Thanks Shewtha!



    I am going to check the lxc setup.

    
https://github.com/CiscoDevNet/iOAM/tree/master/scripts/vpp_sandbox/example/simple-ip6



    By the way in 17.04 there is no classification configuration for transit 
VPP.

    So how that transit VPP understand which packet to rewrite and which not to.

    I have tried 17.04 configuration in 18.04 VPP, but seems like as there is 
no classification part,

    “show errors ” counter in transit vpp doesn’t count up and also “show 
trace” doesn’t shows the IP6_HOP_BY_HOP part.



    Regards,

    Hadi



    From: Shwetha Bhandari (shwethab) [mailto:shwet...@cisco.com]

    Sent: Thursday, July 05, 2018 9:48 AM

    To: HADI SHAIKHZAKER <mailto:h-za...@netone.co.jp>; 
mailto:vpp-dev@lists.fd.io

    Cc: 井上 勝晴 <mailto:i-masah...@netone.co.jp>

    Subject: Re: [vpp-dev] about iOAM configuration



    Hi Hadi,



    > set ioam rewrite trace-type 0x1f trace-elts 4 trace-tsp 1 node-id 0x1 
app-data 0x1234

    To setup the node id and app-data that is needed on transit and decap you 
need a trace profile configs:

    Example: set ioam-trace profile trace-type 0x9 trace-elts 3 trace-tsp 2 
node-id 0x2

    I see that 17.04 had the working configs – this is not correct in 18.04 and 
latest docs. I will fix the documentation in the latest.

    Till then follow https://docs.fd.io/vpp/17.04/ioam_ipv6_doc.html.



    Can you please try this:

    
https://github.com/CiscoDevNet/iOAM/tree/master/scripts/vpp_sandbox/example/simple-ip6

    The scripts bring up lxc setup with 3 VPPs for encap, transit, decap along 
with the necessary configs.



    Thanks,

    Shwetha

    From: <mailto:vpp-dev@lists.fd.io> on behalf of HADI SHAIKHZAKER 
<mailto:h-za...@netone.co.jp>

    Date: Tuesday, July 3, 2018 at 1:21 PM

    To: "mailto:vpp-dev@lists.fd.io"; <mailto:vpp-dev@lists.fd.io>

    Cc: 井上 勝晴 <mailto:i-masah...@netone.co.jp>

    Subject: [vpp-dev] about iOAM configuration



    Hi vpp-dev team,



    I am trying to check the iOAM feature of VPP.

    Do you have any working config sample for this?



    I have checked the following url's and the configuration mentioned, was 
sometimes rejected by the CLI or had no effect.

    [URL1] https://docs.fd.io/vpp/18.04/ioam_plugin_doc.html

    [URL2] https://docs.fd.io/vpp/17.04/ioam_ipv6_doc.html



    I have 3 VPPs

    2102:1100::100-->[Encap VPP]---->[Transit VPP]---->[Decap 
VPP]-->2102:3100::100

     ^this is the src host                                                     
^this one is the dst host



    I have the following configuration for Encap Vpp

    [Encap Vpp] *Want to add iOAM info to all the traffic towards 2102:3100::100

    classify table miss-next ip6-node ip6-lookup mask l3 ip6 dst

    classify session acl-hit-next ip6-node ip6-add-hop-by-hop table-index 0 
match l3 ip6 dst 2102:3100::100

    set int input acl intfc GigabitEthernet1b/0/0 ip6-table 0

    set ioam-trace profile trace-type 0x1f trace-elts 4 trace-tsp 1 node-id 0x1 
app-data 0x1234

    set ioam rewrite trace



    Seems like it does encap the info I wanted

    ======================================

    Trace results

    [Encap Vpp]

      IP6_HOP_BY_HOP: next index 12 len 72 traced 72  Trace Type 0x1f , 3 elts 
left

        [0] ttl 0x0 node id 0x0 ingress 0x0 egress 0x0 ts 0x0

    app 0x0

        [1] ttl 0x0 node id 0x0 ingress 0x0 egress 0x0 ts 0x0

    app 0x0

        [2] ttl 0x0 node id 0x0 ingress 0x0 egress 0x0 ts 0x0

    app 0x0

        [3] ttl 0x40 node id 0x1 ingress 0x3 egress 0x1 ts 0x5efba500  <---- I 
think this one is working fine

    app 0x1234



    The problem I am facing is, configuration for VPP 18.04 as mentioned in the 
URL

    "set ioam rewrite trace-type 0x1f trace-elts 4 trace-tsp 1 node-id 0x1 
app-data 0x1234"

    Is being rejected by the cli, so I have changed it as mentioned above.

    vpp# set ioam rewrite trace-type 0x1f trace-elts 4 trace-tsp 1 node-id 0x1 
app-data 0x1234

    unknown input `-type 0x1f trace-elts 4 trace-...'

    There are some other problems also, like “node” is also rejected by cli, so 
I used ip6-node and this one works

    vpp# classify table miss-next node ip6-lookup mask l3 ip6 dst

    classify table: Mask required

    vpp# classify table miss-next ip6-node ip6-lookup mask l3 ip6 dst

    vpp#



    And url also showing that this config is required for transit and decap VPP 
also.

    So do any one have any working configuration for iOAM?



    Regards,

    Hadi


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

View/Reply Online (#9818): https://lists.fd.io/g/vpp-dev/message/9818
Mute This Topic: https://lists.fd.io/mt/23024218/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