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

Add a mode non-configuration leaf per instance on snabb-softwire-v2 #962

Open
tsyesika opened this issue Sep 22, 2017 · 1 comment
Open
Labels

Comments

@tsyesika
Copy link

Currently there is no good way to know how an instance is configured. One can partially deduce it based on if it has a device in the external-interface container of the instance however it doesn't account for virtio configurations.

I think it'd be fairly easy to add a state data leaf to the queue element which specifies what configuration it's using. I think it'd be useful information for debugging and possibly for operators but also for tests so we can query what mode it's using when we add an instance.

Schema change below:

enumeration RunningMode {
  enum OnAStick {
    description "Using a single NIC for INET-side and B4-side."
  }
  enum BumpInTheWire {
    description "Using two NIC, one for INET traffic and one for B4 traffic.";
  }
  enum Virtio {
    description "Using the virtio-net interfaces instead of Intel 82599."
  }
}

...

list queue {
  ...

  leaf running-mode {
    type RunningMode;
    config false;
    description "The mode the instance is running in.";
  }
}

WDYT @wingo?

@wingo
Copy link

wingo commented Sep 25, 2017

For virtio, since virtio also comes from a PCI address, I feel like it would be nice to be able to just detect when the configured device is virtio or not. I.e. setup.lua takes the conf and just does whatever is necessary. I get what you're saying but am a little hesitant to add a config (or even state!) option that might be redundant.

At the same time I do see where it would be nice to add a state leaf indicating the driver that was chosen for a device! Probably after our next milestone though; wdyt?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants