Skip to content

[BUG] Incoherent timestamps in packtcapture service #295

@FedeParola

Description

@FedeParola

Describe the bug

Packets captured with the packetcapture service form two completely different timestamp sequences.

To Reproduce

Run the following script:

sudo ip netns del ns1 1>/dev/null 2>&1
sudo ip netns del ns2 1>/dev/null 2>&1
sudo ip link del veth1 1>/dev/null 2>&1
sudo ip link del veth2 1>/dev/null 2>&1

sudo ip netns add ns1
sudo ip link add veth1 type veth peer name veth1_
sudo ip link set veth1_ netns ns1
sudo ip link set veth1 up
sudo ip netns exec ns1 ip addr add 10.0.0.1/24 dev veth1_
sudo ip netns exec ns1 ip link set veth1_ up

sudo ip netns add ns2
sudo ip link add veth2 type veth peer name veth2_
sudo ip link set veth2_ netns ns2
sudo ip link set veth2 up
sudo ip netns exec ns2 ip addr add 10.0.0.2/24 dev veth2_
sudo ip netns exec ns2 ip link set veth2_ up

polycubectl helloworld add hw1
polycubectl hw1 ports add veth1 peer=veth1
polycubectl hw1 ports add veth2 peer=veth2
polycubectl hw1 set action=forward
polycubectl packetcapture add pc1
polycubectl pc1 set capture=bidirectional
polycubectl pc1 set filter="all"
polycubectl attach pc1 hw1:veth1

Generate some packets with ping command and inspect the capture.

Expected behavior

Timestamps should all be in sequence.

Additional context

This is probably related to the fact that some timestamps are retrieved from skb and others with pcn_ktime_get_ns().

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions