Skip to content

Implement pcn_time_get_sec() #58

Open
@mauriciovasquezbernal

Description

@mauriciovasquezbernal

Some services need to get a timestamp to implement an aging mechanism. eBPF provides the bpf_ktime_get_ns helper, however we identified this function is slow in different benchmarks.

pcn-simplebride [1] and pcn-iptables [2] implement this by having a map that stores a timestamp that is updated by a thread in user-space, this solution is not ideal as each cube instance has a different thread just to update the timestamp.

This feature should be implemented directly in polycube, having a single thread for all the system to update that counter.

[1] 9a58dd3
[2] https://github.com/polycube-network/polycube/blob/master/src/services/pcn-iptables/src/modules/ConntrackTableUpdate.cpp#L110

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions