Skip to content

Commit

Permalink
Clean up includes
Browse files Browse the repository at this point in the history
  • Loading branch information
ccanel committed May 1, 2024
1 parent d611df4 commit 86a30af
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
8 changes: 4 additions & 4 deletions ratemon/runtime/ratemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@

// Key for use in flow-based maps.
struct rm_flow {
__u32 local_addr;
__u32 remote_addr;
__u16 local_port;
__u16 remote_port;
unsigned int local_addr;
unsigned int remote_addr;
unsigned short local_port;
unsigned short remote_port;
};

#endif /* __RATEMON_H */
10 changes: 0 additions & 10 deletions ratemon/runtime/ratemon_maps.bpf.c
Original file line number Diff line number Diff line change
@@ -1,12 +1,2 @@

// clang-format off
// vmlinux.h needs to be first.
#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
#include <bpf/bpf_tracing.h>
#include <bpf/bpf_core_read.h>
#include <bpf/bpf_endian.h>

#include "ratemon.h"
#include "ratemon_maps.h"
// clang-format on
6 changes: 4 additions & 2 deletions ratemon/runtime/ratemon_maps.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@
#ifndef __RATEMON_MAPS_H
#define __RATEMON_MAPS_H

// clang-format off
// vmlinux.h needs to be first.
#include "vmlinux.h"
#include <bpf/bpf_helpers.h>

#include "ratemon.h"

#define PIN_GLOBAL_NS 2
// clang-format on

// Read RWND limit for flow, as set by userspace. Even though the advertised
// window is only 16 bits in the TCP header, use 32 bits here because we have
Expand Down

0 comments on commit 86a30af

Please sign in to comment.