Skip to content

New struct uref member similar to priv #1067

@JDarnley

Description

@JDarnley

We have a need or desire for a new struct uref member similar to priv but big enough to store at least an IPv6 address in the future. The use for us would be the same as the packet info attributes added in #1021. That attribute works very well but it is surprisingly costly adding an extra 50% to the CPU requirements just for network reception. A thread almost dedicated to upipe_udp_source jumped from to about 25% usage when RXing a 93Mbit stream (4k video split into quadrants) and perf showed a lot of it was caused by the extra malloc to hold the opaque data in the udict.

This lead me to try using the priv member for just the IPv4 address which did work in most places but I discovered that upipe_rtp_feedback uses the member itself (correctly) and overwrites that value I had in it. It did remove the overhead of the new attribute so it was promising. It also showed the poor idea of using something supposed to be for internal pipe usage.

I am making this issue to hear the opinions of other contributors, particularly on the following points.

  • Is this a good idea?
  • Do other people want it, have a use for it?
  • What should it be called?
  • How big does it need to be?

My idea is that it would only be used for high throughput urefs such as those coming from a network socket, not to replace attributes on other less frequent urefs. For us it could be at least as big as struct sockaddr_storage which is 128 bytes on my desktop.

I am going to work on adding it at that size and call it "priv2" for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions