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

Make vxlan port configurable #394

Merged
merged 1 commit into from
Oct 6, 2021

Conversation

zolug
Copy link
Contributor

@zolug zolug commented Sep 29, 2021

networkservicemesh/sdk commit message:
Make vxlan port configurable

Signed-off-by: Zoltan Lugossy [email protected]

@zolug
Copy link
Contributor Author

zolug commented Sep 29, 2021

zolug added a commit to Nordix/nsm-cmd-forwarder-vpp that referenced this pull request Sep 29, 2021
networkservicemesh/sdk-vpp commit message:
Make vxlan port configurable (see networkservicemesh/sdk-vpp#394)

networkservicemesh/sdk commit message:
Make vxlan port configurable (see networkservicemesh/sdk#1091)

Signed-off-by: Zoltan Lugossy <[email protected]>
zolug added a commit to Nordix/nsm-cmd-forwarder-vpp that referenced this pull request Sep 29, 2021
networkservicemesh/sdk-vpp commit message:
Make vxlan port configurable (see networkservicemesh/sdk-vpp#394)

networkservicemesh/sdk commit message:
Make vxlan port configurable (see networkservicemesh/sdk#1091)

Signed-off-by: Zoltan Lugossy <[email protected]>
@edwarnicke
Copy link
Member

I believe if you rebase this on main you will find it passes CI :)

zolug added a commit to Nordix/nsm-cmd-forwarder-vpp that referenced this pull request Sep 30, 2021
networkservicemesh/sdk-vpp commit message:
Make vxlan port configurable (see networkservicemesh/sdk-vpp#394)

networkservicemesh/sdk commit message:
Make vxlan port configurable (see networkservicemesh/sdk#1091)

Signed-off-by: Zoltan Lugossy <[email protected]>
@@ -42,9 +42,9 @@ type vxlanServer struct {
}

// NewServer - returns a new server for the vxlan remote mechanism
func NewServer(vppConn api.Connection, tunnelIP net.IP) networkservice.NetworkServiceServer {
func NewServer(vppConn api.Connection, tunnelIP net.IP, vniOptions ...vni.Option) networkservice.NetworkServiceServer {
Copy link
Member

Choose a reason for hiding this comment

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

Could we please make the Option pattern here local to this package... importing another packages option here precludes other unrelated Options in the future.

type Option func(o *vxlanOpions)

// WithVniOptions sets vni options
func WithVniOptions(vniOptions ...vni.Option) Option {
Copy link
Member

@edwarnicke edwarnicke Sep 30, 2021

Choose a reason for hiding this comment

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

Could we please make this a WithVniPort that takes an int. Passing layers of Options cross binds us at the API level in an unpleasant way. Its easy enough to translate the options in the NewClient/NewServer functions.

}
}

type vxlanOpions struct {
Copy link
Member

Choose a reason for hiding this comment

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

typo:

Suggested change
type vxlanOpions struct {
type vxlanOptions struct {

}

type vxlanOpions struct {
vniPort uint16
Copy link
Member

@edwarnicke edwarnicke Sep 30, 2021

Choose a reason for hiding this comment

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

Suggested change
vniPort uint16
port uint16

@@ -44,13 +44,18 @@ type vxlanClient struct {
}

// NewClient - returns a new client for the vxlan remote mechanism
func NewClient(vppConn api.Connection, tunnelIP net.IP) networkservice.NetworkServiceClient {
func NewClient(vppConn api.Connection, tunnelIP net.IP, options ...Option) networkservice.NetworkServiceClient {
opts := &vxlanOpions{}
Copy link
Member

@edwarnicke edwarnicke Sep 30, 2021

Choose a reason for hiding this comment

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

Suggested change
opts := &vxlanOpions{}
opts := &vxlanOptions{
port: 4789,
}

networkservicemesh/sdk commit message:
Make vxlan port configurable (see networkservicemesh/sdk#1091)

Signed-off-by: Zoltan Lugossy <[email protected]>
@edwarnicke edwarnicke merged commit a3f3e2c into networkservicemesh:main Oct 6, 2021
nsmbot pushed a commit to networkservicemesh/cmd-nse-icmp-responder-vpp that referenced this pull request Oct 6, 2021
…k-vpp@main

PR link: networkservicemesh/sdk-vpp#394

Commit: a3f3e2c
Author: zolug
Date: 2021-10-06 22:52:48 +0200
Message:
  - Make vxlan port configurable (#394)
networkservicemesh/sdk commit message:
Make vxlan port configurable (see networkservicemesh/sdk#1091)

Signed-off-by: NSMBot <[email protected]>
nsmbot pushed a commit to networkservicemesh/cmd-nsc-vpp that referenced this pull request Oct 6, 2021
…k-vpp@main

PR link: networkservicemesh/sdk-vpp#394

Commit: a3f3e2c
Author: zolug
Date: 2021-10-06 22:52:48 +0200
Message:
  - Make vxlan port configurable (#394)
networkservicemesh/sdk commit message:
Make vxlan port configurable (see networkservicemesh/sdk#1091)

Signed-off-by: NSMBot <[email protected]>
nsmbot pushed a commit to networkservicemesh/cmd-nse-firewall-vpp that referenced this pull request Oct 6, 2021
…k-vpp@main

PR link: networkservicemesh/sdk-vpp#394

Commit: a3f3e2c
Author: zolug
Date: 2021-10-06 22:52:48 +0200
Message:
  - Make vxlan port configurable (#394)
networkservicemesh/sdk commit message:
Make vxlan port configurable (see networkservicemesh/sdk#1091)

Signed-off-by: NSMBot <[email protected]>
nsmbot pushed a commit to networkservicemesh/cmd-forwarder-vpp that referenced this pull request Oct 6, 2021
…k-vpp@main

PR link: networkservicemesh/sdk-vpp#394

Commit: a3f3e2c
Author: zolug
Date: 2021-10-06 22:52:48 +0200
Message:
  - Make vxlan port configurable (#394)
networkservicemesh/sdk commit message:
Make vxlan port configurable (see networkservicemesh/sdk#1091)

Signed-off-by: NSMBot <[email protected]>
zolug added a commit to Nordix/nsm-cmd-forwarder-vpp that referenced this pull request Oct 7, 2021
networkservicemesh/sdk-vpp commit message:
Make vxlan port configurable (see networkservicemesh/sdk-vpp#394)

networkservicemesh/sdk commit message:
Make vxlan port configurable (see networkservicemesh/sdk#1091)

Signed-off-by: Zoltan Lugossy <[email protected]>
zolug added a commit to Nordix/nsm-cmd-forwarder-vpp that referenced this pull request Oct 7, 2021
networkservicemesh/sdk-vpp commit message:
Make vxlan port configurable (see networkservicemesh/sdk-vpp#394)

networkservicemesh/sdk commit message:
Make vxlan port configurable (see networkservicemesh/sdk#1091)

Signed-off-by: Zoltan Lugossy <[email protected]>
edwarnicke pushed a commit to networkservicemesh/cmd-forwarder-vpp that referenced this pull request Oct 7, 2021
networkservicemesh/sdk-vpp commit message:
Make vxlan port configurable (see networkservicemesh/sdk-vpp#394)

networkservicemesh/sdk commit message:
Make vxlan port configurable (see networkservicemesh/sdk#1091)

Signed-off-by: Zoltan Lugossy <[email protected]>
nsmbot pushed a commit to networkservicemesh/deployments-k8s that referenced this pull request Oct 7, 2021
…d-forwarder-vpp@main

PR link: https://github.com/networkservicemesh/cmd-forwarder-vpp/pull/

Commit: d531e5d
Author: zolug
Date: 2021-10-07 16:23:45 +0200
Message:
  - Make vxlan port configurable (#341) (#352)
networkservicemesh/sdk-vpp commit message:
Make vxlan port configurable (see networkservicemesh/sdk-vpp#394)

networkservicemesh/sdk commit message:
Make vxlan port configurable (see networkservicemesh/sdk#1091)

Signed-off-by: NSMBot <[email protected]>
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.

3 participants