Skip to contentSkip to conversation

Dynamically adding new multicast streams

DISCUSSION Gaul, Maximilian 2 participants 4 messages Jun 4, 2020

lore
Share & tools
lore
#0 lore raw

Hello everyone,

I try to dynamically add new multicast streams by creating a new AF-XDP socket bound to a RX-Queue. I also create a new ethtool-rule to steer the flow of the multicast stream towards that RX-Queue.

My BPF program has a Hash-Map which maps a struct consisting of { src-ip, dst-ip, dst-port } to an index in the XSKMap (which is then used to redirect an incoming packet). So adding a new AF-XDP socket also means adding a new entry to that Hash-Map (and to the XSKMap).

Now what I am experiencing is that the moment I add a new XSK, other already running sockets are loosing some packets (around 10ms worth of packets). I don't experience any packet loss afterwards.

My question is: Is there something happening inside the XSK- or HashMap which could cause other packet streams to drop packets?

I am not using Shared Umem, just launching a new process which starts that XSK.

Best regards

Max

#1 lore raw
Quoted 6 lines · Maximilian

Hello everyone,

I try to dynamically add new multicast streams by creating a new AF-XDP socket bound to a RX-Queue. I also create a new ethtool-rule to steer the flow of the multicast stream towards that RX-Queue.

Quoted 7 lines

My BPF program has a Hash-Map which maps a struct consisting of { src-ip, dst-ip, dst-port } to an index in the XSKMap (which is then used to redirect an incoming packet). So adding a new AF-XDP socket also means adding a new entry to that Hash-Map (and to the XSKMap).

Now what I am experiencing is that the moment I add a new XSK, other already running sockets are loosing some packets (around 10ms worth of packets). I don't experience any packet loss afterwards.

My question is: Is there something happening inside the XSK- or HashMap which could cause other packet streams to drop packets?

What NIC are you running on?

/Magnus

Quoted 5 lines

I am not using Shared Umem, just launching a new process which starts that XSK.

Best regards

Max

#2 lore raw
Quoted 3 lines

What NIC are you running on?

/Magnus

Hi Magnus,

I am using a MT27800 Family [ConnectX-5].

There probably is something wrong with my code I just wanted to know before going into heavy debugging whether this is something that shouldn't be done.

Max

#3 lore raw
Quoted 10 lines · Maximilian
Quoted 4 lines

What NIC are you running on?

/Magnus

Hi Magnus,

I am using a MT27800 Family [ConnectX-5].

There probably is something wrong with my code I just wanted to know before going into heavy debugging whether this is something that shouldn't be done.

You should be able to do that. I do not know how the ConnectX-5 driver is implemented, but might there be a time period in which it does not serve packets because the NIC is being reconfigured for the added queue?

/Magnus

Quoted 2 lines

Max