-
Notifications
You must be signed in to change notification settings - Fork 93
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
[dpapp] Initial dpapp implementation being a vpp plugin #609
base: main
Are you sure you want to change the base?
Conversation
hi @jimmyzhai - is this ready to merge? Thank you! |
hi @jimmyzhai it looks like we have conflicts that need to be resolved please and thank you. |
d8ad578
to
0c62cf8
Compare
dash-pipeline/vpp-plugin/vpp.sh
Outdated
@@ -0,0 +1,17 @@ | |||
#!/bin/bash |
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.
also rename this file.
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.
done
e2c1a02
to
1ac27da
Compare
@@ -0,0 +1,11 @@ | |||
cmake_minimum_required(VERSION 3.5) |
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.
do you mind to add a README here to help people getting started on it?
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.
done
checking in @jimmyzhai - is this a lower priority in general? TY! |
just checking in :) |
1ac27da
to
527a726
Compare
I'm actively updating this PR now after #608 is merged. |
[like] Kristina Moore reacted to your message:
…________________________________
From: Junhua Zhai ***@***.***>
Sent: Wednesday, October 30, 2024 6:30:48 AM
To: sonic-net/DASH ***@***.***>
Cc: Kristina Moore ***@***.***>; Comment ***@***.***>
Subject: Re: [sonic-net/DASH] [dpapp] Initial dpapp implementation being a vpp plugin (PR #609)
just checking in :)
I'm actively updating this PR now after #608<#608> is merged.
—
Reply to this email directly, view it on GitHub<#609 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AFJSI6B6RQX6YTUMZWPPS2LZ6B4JRAVCNFSM6AAAAABLLAFHBOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBVHE3TOMJUGE>.
You are receiving this because you commented.Message ID: ***@***.***>
|
fb6bab2
to
765c873
Compare
hi @jimmyzhai - do you need help from @chrispsommers on this one? |
276617b
to
0b51e53
Compare
8f735d4
to
8031721
Compare
Found the cause. The runner is stopped due to |
21306ad
to
27c84a6
Compare
27c84a6
to
e0d5880
Compare
7ddc499
to
073d10d
Compare
dash-pipeline/dpapp/dash/dash.c
Outdated
static uword | ||
dash_timer_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) | ||
{ | ||
|
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.
nit: empty line.
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.
fixed
dash-pipeline/dpapp/dash/dash.c
Outdated
int i; | ||
f64 sleep_duration = 1.0; | ||
|
||
unix_sleep (5.0); /* FIXME: delay 5s */ |
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.
will be better to explain why this is a FIXME.
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.
Removed the unnecessary delay
#define REPLY_MSG_ID_BASE sm->msg_id_base | ||
#include <vlibapi/api_helper_macros.h> | ||
|
||
/* *INDENT-OFF* */ |
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.
what does this do?
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.
vpp code style convention
dash-pipeline/dpapp/dash/node.c
Outdated
vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next); | ||
|
||
while (n_left_from >= 4 && n_left_to_next >= 2) | ||
{ |
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.
will be better to get the indent fixed in this file.
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.
fixed
dash-pipeline/dpapp/dash/node.c
Outdated
|
||
typedef enum | ||
{ | ||
DASH_NEXT_INTERFACE_OUTPUT, |
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.
format.
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.
fixed
dash-pipeline/dpapp/dash/node.c
Outdated
en0 = (ethernet_header_t*)dh0 - 1; | ||
#define _(a) tmp0[a] = en0->src_address[a]; | ||
foreach_mac_address_offset; | ||
#undef _ |
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.
this is.... really unintuitive... let's change this to a function
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.
Fixed
dash-pipeline/dpapp/dash/node.c
Outdated
|
||
while (n_left_from >= 4 && n_left_to_next >= 2) | ||
{ | ||
u32 next0 = DASH_NEXT_INTERFACE_OUTPUT; |
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.
will be better to give them better names.
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.
Just follow vpp naming pattern
dash-pipeline/dpapp/dash/node.c
Outdated
foreach_mac_address_offset; | ||
#undef _ | ||
|
||
/* Update dash header */ |
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.
will be better to move this into dedicated functions, same as build new packet, verify, build new packet.
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.
fixed
dash-pipeline/dpapp/dash/node.c
Outdated
u32 next0 = DASH_NEXT_INTERFACE_OUTPUT; | ||
u32 next1 = DASH_NEXT_INTERFACE_OUTPUT; | ||
u32 sw_if_index0, sw_if_index1; | ||
u8 tmp0[6], tmp1[6]; |
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.
if multiple packets are processed in 1 iterator, at least we should create a struct context for each packet instead of doing *0,1. if we really like to do it in the vector way, we should also leverage array, so SIMD instructions can be generated.
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.
also do we really need to process multiple packets at once? although the framework allow us to do, but I don't think this performance will impact us that much.
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.
For simplicity, removed multiple packets processing in 1 iterator.
dash-pipeline/dpapp/dash/node.c
Outdated
|
||
while (n_left_from > 0 && n_left_to_next > 0) | ||
{ | ||
u32 bi0; |
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.
probably can get rid of it to make the code more clear and maintainable. this huge chunk of duplicated code is not really ideal.
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.
fixed
sport = packet['UDP'].sport | ||
dport = packet['UDP'].dport | ||
else: # TODO: later for other ip proto | ||
assert(False) |
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.
throw with message.
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.
fixed
dport, | ||
packet['IP'].proto) | ||
if existed: | ||
assert(flow) |
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.
assert/throw with message.
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.
fixed
if existed: | ||
assert(flow) | ||
else: | ||
assert(not flow) |
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.
assert/throw with message.
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.
fixed
dash-pipeline/dpapp/dash/dash.c
Outdated
|
||
while (1) | ||
{ | ||
/* FIXME: Use time-wheel per-worker thread 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.
Add comment here to highlight the threading model, because dash_flow_table doesn't have a lock.
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.
remove the for loop and fix me.
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.
fixed
e5e9af3
to
ea693a1
Compare
1. not enable dpdk_plugin.so, then not need hugepage allocation 2. Update NODE_FN dash_node to be simple
cae69c5
to
b52014d
Compare
Following dpapp HLD - #606, this is the 3th part implementation. It implements the basic logic of inline flow creation, deletion and ageout.
make dpapp
make run-dpapp