-
Notifications
You must be signed in to change notification settings - Fork 91
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 clang-format #266
add clang-format #266
Conversation
bpf_ringbuf_submit(msg, 0); | ||
} | ||
|
||
static inline void enable_encoding_metadata(struct bpf_sock_ops *skops) |
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 this 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.
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 removed this 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.
It is unused
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.
The enable_encoding_metadata function adds the sock to the sockhashmap. Kernel replaces the sendmsg hook (tcp_bpf_sendmsg) of the sock and then triggers the BPF prog of the sk_msg. Otherwise, there is no bpf hook in the normal tcp_sendmsg.
bpf/kmesh/workload/sendmsg.c
Outdated
break; | ||
} | ||
switch (type) | ||
{ |
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.
{
follows switch
bpf/kmesh/workload/sockops_tuple.c
Outdated
__u32 type; | ||
struct bpf_sock_tuple tuple; | ||
struct ringbuf_msg_type | ||
{ |
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.
{
follows struct/enum
bpf/kmesh/workload/sendmsg.c
Outdated
return 1; | ||
} | ||
if (ret) | ||
{ |
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.
{
follows if/else
20678d7
to
4f542ee
Compare
fd = bpf_create_map_name(inner_info->type, NULL, inner_info->key_size, | ||
inner_info->value_size, inner_info->max_entries, | ||
inner_info->map_flags); | ||
fd = bpf_create_map_name(inner_info->type, NULL, inner_info->key_size, inner_info->value_size, inner_info->max_entries, inner_info->map_flags); |
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.
margin width:120
Signed-off-by: Zhonghu Xu <xuzhonghu@huawei.com>
5ce75e8
to
9ccab28
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: nlgwcy The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What type of PR is this?
What this PR does / why we need it:
Format c files
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: