-
Notifications
You must be signed in to change notification settings - Fork 10
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
Srv6 #151
Draft
ogournet
wants to merge
6
commits into
DPDK:main
Choose a base branch
from
ogournet:srv6
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.
Draft
Srv6 #151
Conversation
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
Add helper to retrieve and parse ip6 address from cli node. Signed-off-by: Olivier Gournet <[email protected]>
It will be needed by other modules that manipulate routes. Fixes: 1e80bd6 ("ip: make route_lookup_exact private") Signed-off-by: Olivier Gournet <[email protected]>
It will be needed by other modules that manipulate routes. Fixes: 4c5ccc8 ("ip6: make route_lookup_exact private") Signed-off-by: Olivier Gournet <[email protected]>
This is a fast and simple way of entering module's nodes, right after route_lookup() in ip_input or ip6_input. The nexthop object inserted in rib4/rib6 should set the input_node field to its node. For example: nh = nexthop_new(...); nh->input_node = gr_node_attach_parent("ip6_input", "my_input_node"); rib6_insert(..., nh); Signed-off-by: Olivier Gournet <[email protected]>
Make nexthop_incref() return itself, as a common design pattern. Signed-off-by: Olivier Gournet <[email protected]>
Add srv6 module. WIP Trace for smoke-test srv6: --------- 23:06:34.382273411 cpu 1 --------- port_rx: port=0 queue=0 eth_input: d2:ad:ca:fe:b4:10 > d2:f0:0c:ba:a5:10 type=IP(0x0800) iface=p0 ip_input: 192.168.61.2 > 192.168.60.1 ttl=64 proto=ICMP(1) srv6_steer: match=192.168.0.0/16 ip6_output: fd00:102::1 > fd00:202::2 ttl=64 proto=IPIP(4) eth_output: d2:f0:0c:ba:a5:11 > d2:ad:ca:fe:b4:11 type=IPv6(0x86dd) iface=p1 port_tx: port=1 queue=0 --------- 23:06:34.382273411 cpu 1 --------- port_rx: port=1 queue=0 eth_input: d2:ad:ca:fe:b4:11 > d2:f0:0c:ba:a5:11 type=IPv6(0x86dd) iface=p1 ip6_input: fd00:102::2 > fd00:202::100 ttl=64 proto=RouteOpts(43) srv6_local: action=end.dt4 ip_input: 192.168.60.1 > 192.168.61.2 ttl=64 proto=ICMP(1) ip_forward: ip_output: 192.168.60.1 > 192.168.61.2 ttl=63 proto=ICMP(1) eth_output: d2:f0:0c:ba:a5:10 > d2:ad:ca:fe:b4:10 type=IP(0x0800) iface=p0 port_tx: port=0 queue=0 Signed-off-by: Olivier Gournet <[email protected]>
vjardin
reviewed
Feb 7, 2025
|
||
if ((str = arg_str(p, "DEST6")) != NULL) { | ||
if (ip6_net_parse(str, &req->s.dest6, true) < 0) | ||
return CMD_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.
don't you need a free(req)
for both error cases DEST6 and DEST4 here after ?
I feel that all the cases:
free(req);
return CMD_ERROR;
should be replaced by a goto cmd_error;
then the end of this function becomes:
free(req);
free(resp_ptr);
return CMD_SUCCESS;
cmd_error:
free(req);
return CMD_ERROR;
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
no interface are created, instead a hook is added in ip/ip6_input to visit our node.
need inputs on core grout modification before going further.
grcli trace from smoke-test srv6: