-
Notifications
You must be signed in to change notification settings - Fork 11
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 vfio-server #1
Conversation
Signed-off-by: Vladimir Popov <vladimir.popov@xored.com>
Signed-off-by: Vladimir Popov <vladimir.popov@xored.com>
Signed-off-by: Vladimir Popov <vladimir.popov@xored.com>
c89d053
to
c4175c3
Compare
Signed-off-by: Vladimir Popov <vladimir.popov@xored.com>
Signed-off-by: Vladimir Popov <vladimir.popov@xored.com>
d95c39e
to
0137746
Compare
Signed-off-by: Vladimir Popov <vladimir.popov@xored.com>
5925cdb
to
a01453e
Compare
@@ -20,4 +23,5 @@ CMD dlv -l :40000 --headless=true --api-version=2 test -test.v ./... | |||
|
|||
FROM alpine as runtime | |||
COPY --from=build /bin/app /bin/app | |||
COPY --from=build /bin/dlv /bin/dlv |
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.
Note: you could use target debug.
COPY --from=build /bin/dlv /bin/dlv |
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.
Yes, but there is an additional option to start debugging ourselves with passed env variable:
Lines 77 to 79 in a01453e
if err := debug.Self(); err != nil { | |
log.Entry(ctx).Infof("%s", err) | |
} |
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'm not sure that we need dlv in runtiume.
"github.com/networkservicemesh/cmd-nse-vfio/internal/config" | ||
) | ||
|
||
type mapServer struct { |
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.
Why it is not part of sdk-sriov?
// Name@Domain: { addr: MACAddr; vlan: VLANTag; labels: Labels; } | ||
// MACAddr = xx:xx:xx:xx:xx:xx | ||
// Labels = label_1=value_1&label_2=value_2 | ||
func (s *ServiceConfig) UnmarshalBinary(bytes []byte) (err error) { |
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.
why not use json here?
Description
vfio-server
nse providesnetwork service -> { MAC address, VLAN tag }
mapping.Configuration
Name@Domain: { addr: MACAddr; vlan: VLANTag; labels: Labels; }
MACAddr = xx:xx:xx:xx:xx:xx
Labels = label_1=value_1&label_2=value_2
- Name - a Network Service name
- Domain - a Network Service domain (don't confuse it with interdomain domains)
- MACAddr - a MAC address for the Network Service
- VLANTag - a VLAN tag for the Network Service
- labelN=valueN - pairs of labels supported by the Network Service