Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reconnect #187

Merged
merged 2 commits into from
Jun 4, 2014
Merged

Reconnect #187

merged 2 commits into from
Jun 4, 2014

Conversation

ghost
Copy link

@ghost ghost commented Jun 3, 2014

This patch set implements a simple "reconnect" feature on the snabbswitch side only.
It does 2 things:

  • ensures that the buffers are used from the avail ring and returned to the used ring in ascending order
  • restires the txavai/rxavail from the used.idx of the ring

This works under no or light load (ping).

Under heavy load one needs to restart the interface in the virtual machine, for example:
ifconfig eth0 down && ifconfig eth0 up

NOTE: This feature is not tested enough for production quality. It relies on buffers being used in a particular order.

Nikolay Nikolaev added 2 commits May 31, 2014 07:28
Freelist implements LIFO queue. This means that when the buffers are added
from the vm, they'll be used in reverse order (remove pops the last one).

This patch uses a different algorithm to add buffers so they can be popped
in the ascending order. This is done for both Rx and Tx.

Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
In order to reconnect we need to restore txavail and rxavail.
We restore them from the used.idx of each vring.

Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com>
@lukego
Copy link
Member

lukego commented Jun 4, 2014

Thanks! This should be really practical, even given the caveats. It's quite a luxury to be able to restart the snabb process at any time e.g. when doing integration testing with another box and deploying a series of small code tweaks to make it happy.

lukego added a commit that referenced this pull request Jun 4, 2014
vhost-user reconnect support (limited)
@lukego lukego merged commit e061625 into snabbco:master Jun 4, 2014
mwiget pushed a commit to mwiget/snabb that referenced this pull request Jan 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant