-
Notifications
You must be signed in to change notification settings - Fork 16
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
WIP: Add intel vsp #210
Open
bn222
wants to merge
4
commits into
openshift:main
Choose a base branch
from
bn222:ipu
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+112,184
−166
Open
WIP: Add intel vsp #210
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#/usr/local/lib/python3.9/site-packages/ SPDX-License-Identifier: Apache-2.0 | ||
# Copyright (c) 2024 Intel Corporation | ||
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.22-openshift-4.18 AS builder | ||
ARG TARGETOS | ||
ARG TARGETARCH | ||
|
||
COPY . /usr/src/ipu-opi-plugin | ||
WORKDIR /usr/src/ipu-opi-plugin | ||
RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o bin/ipuplugin cmd/intelvsp/intelvsp.go | ||
|
||
FROM registry.ci.openshift.org/ocp/4.18:base-rhel9 | ||
|
||
COPY --from=builder /usr/src/ipu-opi-plugin/bin/ipuplugin /usr/bin/ | ||
COPY cmd/intelvsp/fxp-net_linux-networking.pkg / | ||
RUN mkdir -p /opt/p4/p4-cp-nws/bin/ | ||
COPY cmd/intelvsp/p4rt-ctl /opt/p4/p4-cp-nws/bin/ | ||
#TODO: Update to newer package, according to release. | ||
COPY cmd/intelvsp/p4runtime-2023.11.0-py3-none-any.whl /opt/p4/p4-cp-nws/bin/ | ||
RUN dnf install -y python3-pip openssh NetworkManager openvswitch iproute | ||
RUN python3 -m pip install --no-cache-dir /opt/p4/p4-cp-nws/bin/p4runtime-2023.11.0-py3-none-any.whl | ||
|
||
WORKDIR / | ||
LABEL io.k8s.display-name="IPU OPI Plugin" | ||
ENV PYTHONUNBUFFERED=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package intelvsp | ||
|
||
import ( | ||
"github.com/intel/ipu-opi-plugins/ipu-plugin/ipuplugin/cmd" | ||
"os" | ||
) | ||
|
||
func main() { | ||
os.Setenv("P4_NAME", "fxp-net_linux-networking") | ||
cmd.Execute() | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bn222 latest ipu-plugin code uses P4_NAME in Makefile(https://github.com/intel/ipu-opi-plugins/blob/main/ipu-plugin/Makefile#L5), and exports env variable->P4_NAME in Dockerfile(https://github.com/intel/ipu-opi-plugins/blob/main/ipu-plugin/images/Dockerfile#L16) , and uses it in the code(thro getenv) in lifecycleservice.go->https://github.com/intel/ipu-opi-plugins/blob/main/ipu-plugin/pkg/ipuplugin/lifecycleservice.go#L542
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i.e. https://github.com/bn222/cluster-deployment-automation/blob/main/dpuVendor.py#L71
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can't have that as variables at this level, hence I've replaced the vars with what we are using.
Also, since there is code that reads the env var (which we should remove, and use a proper function to set it), I've added it to the call-site.