Skip to content

Commit 4b98e44

Browse files
author
lec-bit
committed
update, optimize funcname
Signed-off-by: lec-bit <glfhzmy@126.com>
1 parent 0475704 commit 4b98e44

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

bpf/include/bpf_common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ static inline void record_kmesh_managed_ip(__u32 family, __u32 ip4, __u32 *ip6)
235235

236236
err = bpf_map_update_elem(&map_of_manager, &key, &value, BPF_ANY);
237237
if (err)
238-
BPF_LOG(ERR, KMESH, "record ip failed!, err is %d\n", err);
238+
BPF_LOG(ERR, KMESH, "record ip failed, err is %d\n", err);
239239
}
240240

241241
static inline void remove_kmesh_managed_ip(__u32 family, __u32 ip4, __u32 *ip6)
@@ -248,7 +248,7 @@ static inline void remove_kmesh_managed_ip(__u32 family, __u32 ip4, __u32 *ip6)
248248

249249
int err = bpf_map_delete_elem(&map_of_manager, &key);
250250
if (err && err != -ENOENT)
251-
BPF_LOG(ERR, KMESH, "remove ip failed!, err is %d\n", err);
251+
BPF_LOG(ERR, KMESH, "remove ip failed, err is %d\n", err);
252252
}
253253

254254
static inline bool conn_from_sim(struct bpf_sock_ops *skops, __u32 ip, __u16 port)

pkg/bpf/ads/loader.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ type BpfSockOps struct {
5858
bpf2go.KmeshSockopsObjects
5959
}
6060

61-
func Bpf2goLoadKmeshCgroupSock() (*ebpf.CollectionSpec, error) {
61+
func loadKmeshCgroupSock() (*ebpf.CollectionSpec, error) {
6262
var spec *ebpf.CollectionSpec
6363
var err error
6464
if helper.KernelVersionLowerThan5_13() {
@@ -69,7 +69,7 @@ func Bpf2goLoadKmeshCgroupSock() (*ebpf.CollectionSpec, error) {
6969
return spec, err
7070
}
7171

72-
func Bpf2goLoadKmeshSockOps() (*ebpf.CollectionSpec, error) {
72+
func loadKmeshSockOps() (*ebpf.CollectionSpec, error) {
7373
var spec *ebpf.CollectionSpec
7474
var err error
7575
if helper.KernelVersionLowerThan5_13() {

pkg/bpf/ads/loader_enhanced.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ type BpfSockOps struct {
5757
bpf2go.KmeshSockopsObjects
5858
}
5959

60-
func Bpf2goLoadKmeshCgroupSock() (*ebpf.CollectionSpec, error) {
60+
func loadKmeshCgroupSock() (*ebpf.CollectionSpec, error) {
6161
var spec *ebpf.CollectionSpec
6262
var err error
6363
if helper.KernelVersionLowerThan5_13() {
@@ -68,7 +68,7 @@ func Bpf2goLoadKmeshCgroupSock() (*ebpf.CollectionSpec, error) {
6868
return spec, err
6969
}
7070

71-
func Bpf2goLoadKmeshSockOps() (*ebpf.CollectionSpec, error) {
71+
func loadKmeshSockOps() (*ebpf.CollectionSpec, error) {
7272
var spec *ebpf.CollectionSpec
7373
var err error
7474
if helper.KernelVersionLowerThan5_13() {

pkg/bpf/ads/sock_connection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func (sc *BpfSockConn) loadKmeshSockConnObjects() (*ebpf.CollectionSpec, error)
7171
)
7272
opts.Maps.PinPath = sc.Info.MapPath
7373

74-
spec, err = Bpf2goLoadKmeshCgroupSock()
74+
spec, err = loadKmeshCgroupSock()
7575
if err != nil || spec == nil {
7676
return nil, err
7777
}

pkg/bpf/ads/sock_ops.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (sc *BpfSockOps) loadKmeshSockopsObjects() (*ebpf.CollectionSpec, error) {
5959
)
6060

6161
opts.Maps.PinPath = sc.Info.MapPath
62-
spec, err = Bpf2goLoadKmeshSockOps()
62+
spec, err = loadKmeshSockOps()
6363
if err != nil || spec == nil {
6464
return nil, err
6565
}

0 commit comments

Comments
 (0)