diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index 246c06c..db45fbc 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -47,7 +47,7 @@ jobs: path: recipe - name: Install dpdk-sde - uses: robinraju/release-downloader@v1.9 + uses: robinraju/release-downloader@v1.10 with: repository: ${{ env.SDE_REPOSITORY }} tag: ${{ env.SDE_TAG }} @@ -57,7 +57,7 @@ jobs: rm $SDE_FILENAME - name: Install stratum-deps - uses: robinraju/release-downloader@v1.9 + uses: robinraju/release-downloader@v1.10 with: repository: ${{ env.DEPS_REPOSITORY }} tag: ${{ env.DEPS_TAG }} @@ -93,7 +93,7 @@ jobs: path: recipe - name: Install dpdk-sde - uses: robinraju/release-downloader@v1.9 + uses: robinraju/release-downloader@v1.10 with: repository: ${{ env.SDE_REPOSITORY }} tag: ${{ env.SDE_TAG }} @@ -103,7 +103,7 @@ jobs: rm $SDE_FILENAME - name: Install stratum-deps - uses: robinraju/release-downloader@v1.9 + uses: robinraju/release-downloader@v1.10 with: repository: ${{ env.DEPS_REPOSITORY }} tag: ${{ env.DEPS_TAG }} diff --git a/switchapi/es2k/CMakeLists.txt b/switchapi/es2k/CMakeLists.txt index 44b5f1c..7436e32 100644 --- a/switchapi/es2k/CMakeLists.txt +++ b/switchapi/es2k/CMakeLists.txt @@ -14,6 +14,7 @@ target_sources(switchapi_o PRIVATE switch_neighbor.c switch_nhop.c switch_pd_fdb.c + switch_pd_lag.h switch_pd_p4_name_mapping.h switch_pd_tunnel.c switch_pd_utils.c diff --git a/switchapi/es2k/switch_lag.c b/switchapi/es2k/switch_lag.c index b0ff6ed..36656ce 100644 --- a/switchapi/es2k/switch_lag.c +++ b/switchapi/es2k/switch_lag.c @@ -17,12 +17,8 @@ #include "switchapi/switch_lag.h" +#include "switch_pd_lag.h" #include "switch_pd_utils.h" -#ifdef LNW_V2 -#include "lnw_v2/switch_pd_lag.h" -#else -#include "lnw_v3/switch_pd_lag.h" -#endif #include "switchapi/switch_base_types.h" #include "switchapi/switch_device.h" #include "switchapi/switch_internal.h" diff --git a/switchapi/es2k/switch_pd_lag.h b/switchapi/es2k/switch_pd_lag.h new file mode 100644 index 0000000..5cf9c71 --- /dev/null +++ b/switchapi/es2k/switch_pd_lag.h @@ -0,0 +1,37 @@ +/* + * Copyright 2024 Intel Corporation. + * SPDX-License_Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Proxy for the version-specific switch_pd_lag.h files. +// +// This header file encapsulates the knowledge that there are different +// versions of the header file. +// +// Note that it must use a different include guard than the files it +// includes. + +#ifndef __SWITCH_PD_LAG_WRAPPER_H__ +#define __SWITCH_PD_LAG_WRAPPER_H__ + +#if defined(LNW_V2) +#include "lnw_v2/switch_pd_lag.h" +#elif defined(LNW_V3) +#include "lnw_v3/switch_pd_lag.h" +#else +#error "Undefined or missing LNW conditional!" +#endif + +#endif // __SWITCH_PD_LAG_WRAPPER_H__