Skip to content

Conversation

@zshi-redhat
Copy link
Contributor

No description provided.

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 7, 2021
@zshi-redhat
Copy link
Contributor Author

/cc @jboxman ptal, the sriov doc for https://issues.redhat.com/browse/SDN-1170

/cc @atyronesmith

@jboxman jboxman self-assigned this Jan 7, 2021
@jboxman
Copy link
Contributor

jboxman commented Jan 8, 2021

@zshi-redhat looks like after 2 years I learned how to push to someone else's PR;

Can you look at the changes and let me know what you think?

Thanks!

pfNames: ["<pf_name>", ...] <11>
rootDevices: ["<pci_bus_id>", "..."] <12>
netFilter: "<filter_string>" <13>
netFilter: "<filter_string>" <13>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the indent is not perfect yet, we need to keep it the same as other selectors like rootDevices.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent still doesn't look correct?

====
`xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` is the `network_id` from `/var/config/openstack/latest/network_data.json` metadata file.
====
<13> Optional: The platform specific filter string. The only supported platform is {rh-openstack-first}. Acceptable values are of the following format: `openstack/NetworkID:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`. Replace `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` with the value from the `/var/config/openstack/latest/network_data.json` metadata file.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice change!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition, the administrator should also know the OpenStack Network UUID apriori as part of network planning. The OpenStack networks are created to glue together the different VNF/CNF components in the system and have been architected to carry the necessary information.

----

The following example describes the configuration for a SR-IOV device in OpenStack Virtual Machine:
The following example describes the configuration for an SR-IOV device in a {rh-openstack} virtual machine:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed the platform is using {rh-openstack-first} in <13>, but this one is {rh-openstack}, is there any difference?

@zshi-redhat
Copy link
Contributor Author

@zshi-redhat looks like after 2 years I learned how to push to someone else's PR;

You got to share the tips :-)

Copy link

@atyronesmith atyronesmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a few tweaks on line 64, but not really necessary.

====
`xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` is the `network_id` from `/var/config/openstack/latest/network_data.json` metadata file.
====
<13> Optional: The platform specific filter string. The only supported platform is {rh-openstack-first}. Acceptable values are of the following format: `openstack/NetworkID:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`. Replace `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx` with the value from the `/var/config/openstack/latest/network_data.json` metadata file.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition, the administrator should also know the OpenStack Network UUID apriori as part of network planning. The OpenStack networks are created to glue together the different VNF/CNF components in the system and have been architected to carry the necessary information.

pfNames: ["<pf_name>", ...] <11>
rootDevices: ["<pci_bus_id>", "..."] <12>
netFilter: "<filter_string>" <13>
netFilter: "<filter_string>" <13>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent still doesn't look correct?

feature.node.kubernetes.io/network-sriov.capable: "true"
numVfs: 1 <1>
nicSelector:
vendor: "15b3"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'vendor' and 'deviceID' fields are mostly superfluous as there real match is to the UUID.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atyronesmith I don't have environment to test, if we remove vendor/device IDs from policy, will it expose virtio or other non-sriov devices as k8s resource when the given network ID matches ?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My environment is down now as well.... However, if I remember correctly (and I look at https://github.com/openshift/sriov-network-operator/blob/f6aba07546d2c85b319bf3bfeb9deb45a2f007f5/api/v1/helper.go#L429)

A non-zero netFilter will only match that specific netfiler.

Copy link

@mikemckiernan mikemckiernan Feb 1, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@atyronesmith , Jason asked me to do light wordsmithing on this PR and then get it merged. Regarding these two comments about the nicSelector:

Should netFilter be aligned with rootDevices? (I'm guessing yes if the same receiver function can handle both in the helper.go file, but I'm using my imagination.)

The 'vendor' and 'deviceID' fields are mostly superfluous as there real match is to the UUID.

Do you want the doc to suggest using netFilter because it is the most specific? Depending on your answer to this question and if you indicate that netFilter is subordinate to nicSelector, then netFilter deserves some mention in the callout for #8, nicSelector.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @mikemckiernan, netFilter should be used as it is the most specific. RootDevices does not need to be used as netFilter is specific. NetFilter is subordinate to nicSelector and is at the same level as rootDevices, vendor, devicdeID, etc...

@jboxman
Copy link
Contributor

jboxman commented Jan 11, 2021

@zshi-redhat, I used:

$ brew install gh
$ gh pr checkout 28418
# make changes to PR
$ git push

The gh command adds the correct upstream in the .git/config, so git push is enough.

@jboxman
Copy link
Contributor

jboxman commented Jan 27, 2021

@zshi-redhat, I wonder if this file also needs to be updated? modules/nw-sriov-configuring-device.adoc

@zshi-redhat
Copy link
Contributor Author

@zshi-redhat, I wonder if this file also needs to be updated? modules/nw-sriov-configuring-device.adoc

@jboxman thanks for the question, do you mean updating the virt-sriov section (for CNV product)?
If yes, the answer is no, reason being OCP on OSP is different from CNV in terms of using sriov-operator netFilter selector.
If CNV would run on OCP on OSP, then there will be nested VMs (CNV VM in OCP Pod in OSP VM), I didn't hear such request.

@jboxman
Copy link
Contributor

jboxman commented Feb 3, 2021

Going to close this PR as superseded.

@jboxman jboxman closed this Feb 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants