Skip to content

Commit

Permalink
Fix errors in Bazel build (#141)
Browse files Browse the repository at this point in the history
Updated Bazel build to reflect recent changes in codebase.

Signed-off-by: Derek Foster <[email protected]>
  • Loading branch information
ffoulkes authored Jun 13, 2024
1 parent 3aeff0b commit 7729eb9
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 16 deletions.
14 changes: 8 additions & 6 deletions switchapi/es2k/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,6 @@ SWITCH_PD_LAG_HDR = select({
"//flags:lnw_v3": ["//switchapi/es2k/lnw_v3:switch_pd_lag_hdr"],
})

SWITCH_PD_P4_NAME_ROUTING = select({
"//flags:lnw_v2": ["//switchapi/es2k/lnw_v2:switch_pd_p4_name_routing"],
"//flags:lnw_v3": ["//switchapi/es2k/lnw_v3:switch_pd_p4_name_routing"],
})

SWITCH_PD_ROUTING = select({
"//flags:lnw_v2": ["//switchapi/es2k/lnw_v2:switch_pd_routing"],
"//flags:lnw_v3": ["//switchapi/es2k/lnw_v3:switch_pd_routing"],
Expand Down Expand Up @@ -169,10 +164,17 @@ krnlmon_cc_library(
hdrs = ["switch_pd_p4_name_mapping.h"],
)

krnlmon_cc_library(
name = "switch_pd_p4_name_routing",
hdrs = ["switch_pd_p4_name_routing.h"],
)

krnlmon_cc_library(
name = "switch_pd_routing_hdr",
hdrs = ["switch_pd_routing.h"],
deps = SWITCH_PD_P4_NAME_ROUTING,
deps = [
":switch_pd_p4_name_routing",
],
)

krnlmon_cc_library(
Expand Down
5 changes: 0 additions & 5 deletions switchapi/es2k/lnw_v2/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ krnlmon_cc_library(
],
)

krnlmon_cc_library(
name = "switch_pd_p4_name_routing",
hdrs = ["switch_pd_p4_name_routing.h"],
)

krnlmon_cc_library(
name = "switch_pd_routing",
srcs = ["switch_pd_routing.c"],
Expand Down
24 changes: 19 additions & 5 deletions switchapi/es2k/lnw_v3/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,21 @@ load("//bazel:rules.bzl", "krnlmon_cc_library")

package(default_visibility = ["//visibility:public"])

krnlmon_cc_library(
name = "lnw_ecmp_hash_table",
hdrs = ["lnw_ecmp_hash_table.h"],
)

krnlmon_cc_library(
name = "lnw_ecmp_nexthop_table",
hdrs = ["lnw_ecmp_nexthop_table.h"],
)

krnlmon_cc_library(
name = "lnw_nexthop_table",
hdrs = ["lnw_nexthop_table.h"],
)

krnlmon_cc_library(
name = "switch_pd_lag_hdr",
hdrs = ["switch_pd_lag.h"],
Expand All @@ -22,20 +37,19 @@ krnlmon_cc_library(
"//switchapi:switch_internal",
"//switchapi:switch_lag",
"//switchapi/es2k:switch_pd_p4_name_mapping",
"//switchapi/es2k:switch_pd_p4_name_routing",
"//switchapi/es2k:switch_pd_utils",
"@local_es2k_bin//:sde_hdrs",
],
)

krnlmon_cc_library(
name = "switch_pd_p4_name_routing",
hdrs = ["switch_pd_p4_name_routing.h"],
)

krnlmon_cc_library(
name = "switch_pd_routing",
srcs = ["switch_pd_routing.c"],
deps = [
":lnw_ecmp_hash_table",
":lnw_ecmp_nexthop_table",
":lnw_nexthop_table",
"//switchapi:switch_base_types",
"//switchapi:switch_handle",
"//switchapi:switch_l3",
Expand Down

0 comments on commit 7729eb9

Please sign in to comment.