Skip to content

Commit

Permalink
Conform to Linter
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin De Vierno committed Jul 20, 2020
1 parent 0888f1a commit ac08651
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions examples/test_flow_dir/test_flow_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ do_stats_display(struct rte_mbuf *pkt) {
*/

static void
populate_ipv4_flow_table(void){
populate_ipv4_flow_table(void) {
struct test_add_key {
struct onvm_ft_ipv4_5tuple key;
uint8_t destinations[ONVM_MAX_CHAIN_LENGTH];
Expand All @@ -179,7 +179,7 @@ populate_ipv4_flow_table(void){
uint32_t num_keys = RTE_DIM(keys);
struct onvm_flow_entry *flow_entry = NULL;
flow_entry = (struct onvm_flow_entry *) rte_calloc(NULL, 1, sizeof(struct onvm_flow_entry), 0);
for (uint32_t i = 0; i < num_keys; i++){
for (uint32_t i = 0; i < num_keys; i++) {
struct onvm_ft_ipv4_5tuple key;
memset(&key, 0, sizeof(struct onvm_ft_ipv4_5tuple));
key = keys[i].key;
Expand Down
8 changes: 4 additions & 4 deletions onvm/onvm_nflib/onvm_flow_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ onvm_ft_free(struct onvm_ft *table);

static inline void
_onvm_ft_print_key(struct onvm_ft_ipv4_5tuple *key) {
printf("IP: %" PRIu8 ".%" PRIu8 ".%" PRIu8 ".%" PRIu8, (key->src_addr >> 24) & 0xFF, (key->src_addr >> 16) & 0xFF,
(key->src_addr >> 8) & 0xFF, key->src_addr & 0xFF);
printf("-%" PRIu8 ".%" PRIu8 ".%" PRIu8 ".%" PRIu8 " ", (key->dst_addr >> 24) & 0xFF, (key->dst_addr >> 16) & 0xFF,
(key->dst_addr >> 8) & 0xFF, key->dst_addr & 0xFF);
printf("IP: %" PRIu8 ".%" PRIu8 ".%" PRIu8 ".%" PRIu8, (key->src_addr >> 24) & 0xFF,
(key->src_addr >> 16) & 0xFF, (key->src_addr >> 8) & 0xFF, key->src_addr & 0xFF);
printf("-%" PRIu8 ".%" PRIu8 ".%" PRIu8 ".%" PRIu8 " ", (key->dst_addr >> 24) & 0xFF,
(key->dst_addr >> 16) & 0xFF, (key->dst_addr >> 8) & 0xFF, key->dst_addr & 0xFF);
printf("Port: %d %d Proto: %d\n", key->src_port, key->dst_port, key->proto);
}

Expand Down

0 comments on commit ac08651

Please sign in to comment.