Skip to content

Commit

Permalink
EOS SDK v2.23.2 (EOS 4.33.1F)
Browse files Browse the repository at this point in the history
  • Loading branch information
prufer committed Dec 18, 2024
1 parent d10a17b commit 8745313
Show file tree
Hide file tree
Showing 14 changed files with 105 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#-----------------------------------------------------------------------------------

FROM almalinux:9
ARG version=2.23.1
ARG version=2.23.2

# Set eossdk version as label and environ variable.
LABEL version=$version
Expand Down
1 change: 0 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ lib_LTLIBRARIES = libeos.la
AM_CXXFLAGS = -fvisibility=hidden
AM_CXXFLAGS += $(EXTRA_CFLAGS)
AM_CXXFLAGS += -Wextra -Wall -Wnon-virtual-dtor -Werror -Wno-unused-parameter -Wno-error=unused-value -fPIC -fPIE -fvisibility-inlines-hidden
AM_CXXFLAGS += -DTRAFFIC_POLICY_ENABLED
AM_LDFLAGS = -Wl,--no-undefined -fPIC -fPIE

PUBLISHED_HEADER_FILES := $(wildcard eos/*.h) $(wildcard eos/inline/*.h) $(wildcard eos/types/*.h) $(wildcard eos/inline/types/*.h)
Expand Down
2 changes: 2 additions & 0 deletions eos/inline/types/mac_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ operator<<(std::ostream& os, const mac_entry_type_t & enum_val) {
os << "MAC_ENTRY_VPLS_DYNAMIC_REMOTE";
} else if (enum_val==MAC_ENTRY_SOFTWARE_LEARNED_DYNAMIC) {
os << "MAC_ENTRY_SOFTWARE_LEARNED_DYNAMIC";
} else if (enum_val==MAC_ENTRY_DFW_CONFIGURED_STATIC) {
os << "MAC_ENTRY_DFW_CONFIGURED_STATIC";
} else {
os << "Unknown value";
}
Expand Down
8 changes: 8 additions & 0 deletions eos/inline/types/nexthop_group.h
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,14 @@ nexthop_group_t::version_id_is(uint16_t version_id) {
pimpl->version_id_is(version_id);
}
bool
nexthop_group_t::per_entry_backups() const {
return pimpl->per_entry_backups();
}
void
nexthop_group_t::per_entry_backups_is(bool per_entry_backups) {
pimpl->per_entry_backups_is(per_entry_backups);
}
bool
nexthop_group_t::operator==(nexthop_group_t const & other) const {
return pimpl->operator==(*other.pimpl);
}
Expand Down
30 changes: 24 additions & 6 deletions eos/inline/types/nexthop_group_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -436,15 +436,17 @@ nexthop_group_impl_t::nexthop_group_impl_t() :
name_(), type_(), gre_key_type_(NEXTHOP_GROUP_GRE_KEY_NULL), ttl_(64),
source_ip_(), source_intf_(), autosize_(false), nexthops_(),
backup_nexthops_(), destination_ips_(), counters_unshared_(),
hierarchical_fecs_enabled_(false), counters_persistent_(), version_id_() {
hierarchical_fecs_enabled_(false), counters_persistent_(), version_id_(),
per_entry_backups_(false) {
}

nexthop_group_impl_t::nexthop_group_impl_t(std::string name,
nexthop_group_encap_t type) :
name_(name), type_(type), gre_key_type_(NEXTHOP_GROUP_GRE_KEY_NULL),
ttl_(64), source_ip_(), source_intf_(), autosize_(false), nexthops_(),
backup_nexthops_(), destination_ips_(), counters_unshared_(),
hierarchical_fecs_enabled_(false), counters_persistent_(), version_id_() {
hierarchical_fecs_enabled_(false), counters_persistent_(), version_id_(),
per_entry_backups_(false) {
}

nexthop_group_impl_t::nexthop_group_impl_t(
Expand All @@ -453,15 +455,16 @@ nexthop_group_impl_t::nexthop_group_impl_t(
name_(name), type_(type), gre_key_type_(gre_key_type), ttl_(64),
source_ip_(), source_intf_(), autosize_(false), nexthops_(),
backup_nexthops_(), destination_ips_(), counters_unshared_(),
hierarchical_fecs_enabled_(false), counters_persistent_(), version_id_() {
hierarchical_fecs_enabled_(false), counters_persistent_(), version_id_(),
per_entry_backups_(false) {
}

nexthop_group_impl_t::nexthop_group_impl_t(std::string name,
ip_addr_t const & source_ip) :
name_(name), type_(), gre_key_type_(), ttl_(), source_ip_(source_ip),
source_intf_(), autosize_(), nexthops_(), backup_nexthops_(),
destination_ips_(), counters_unshared_(), hierarchical_fecs_enabled_(false),
counters_persistent_(), version_id_() {
counters_persistent_(), version_id_(), per_entry_backups_(false) {
}

nexthop_group_impl_t::nexthop_group_impl_t(
Expand All @@ -470,7 +473,7 @@ nexthop_group_impl_t::nexthop_group_impl_t(
name_(name), type_(), gre_key_type_(), ttl_(), source_ip_(source_ip),
source_intf_(), autosize_(), nexthops_(nexthops), backup_nexthops_(),
destination_ips_(), counters_unshared_(), hierarchical_fecs_enabled_(false),
counters_persistent_(), version_id_() {
counters_persistent_(), version_id_(), per_entry_backups_(false) {
}

std::string
Expand Down Expand Up @@ -713,6 +716,16 @@ nexthop_group_impl_t::version_id_is(uint16_t version_id) {
version_id_ = version_id;
}

bool
nexthop_group_impl_t::per_entry_backups() const {
return per_entry_backups_;
}

void
nexthop_group_impl_t::per_entry_backups_is(bool per_entry_backups) {
per_entry_backups_ = per_entry_backups;
}

bool
nexthop_group_impl_t::operator==(nexthop_group_impl_t const & other) const {
return name_ == other.name_ &&
Expand All @@ -728,7 +741,8 @@ nexthop_group_impl_t::operator==(nexthop_group_impl_t const & other) const {
counters_unshared_ == other.counters_unshared_ &&
hierarchical_fecs_enabled_ == other.hierarchical_fecs_enabled_ &&
counters_persistent_ == other.counters_persistent_ &&
version_id_ == other.version_id_;
version_id_ == other.version_id_ &&
per_entry_backups_ == other.per_entry_backups_;
}

bool
Expand Down Expand Up @@ -766,6 +780,8 @@ nexthop_group_impl_t::operator<(nexthop_group_impl_t const & other) const {
return counters_persistent_ < other.counters_persistent_;
} else if(version_id_ != other.version_id_) {
return version_id_ < other.version_id_;
} else if(per_entry_backups_ != other.per_entry_backups_) {
return per_entry_backups_ < other.per_entry_backups_;
}
return false;
}
Expand Down Expand Up @@ -805,6 +821,7 @@ nexthop_group_impl_t::mix_me(hash_mix & h) const {
h.mix(hierarchical_fecs_enabled_); // bool
h.mix(counters_persistent_); // bool
h.mix(version_id_); // uint16_t
h.mix(per_entry_backups_); // bool
}

std::string
Expand Down Expand Up @@ -858,6 +875,7 @@ nexthop_group_impl_t::to_string() const {
ss << ", hierarchical_fecs_enabled=" << hierarchical_fecs_enabled_;
ss << ", counters_persistent=" << counters_persistent_;
ss << ", version_id=" << version_id_;
ss << ", per_entry_backups=" << per_entry_backups_;
ss << ")";
return ss.str();
}
Expand Down
11 changes: 11 additions & 0 deletions eos/mpls_route.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ class EOS_SDK_PUBLIC mpls_route_mgr : public base_mgr<mpls_route_handler,
virtual mpls_route_via_iter_t mpls_route_via_iter(mpls_route_key_t const &)
const = 0;

/// Returns a configured MPLS backup vias iterator for a given route (key).
mpls_route_via_iter_t mpls_route_backup_via_iter(mpls_route_key_t const&);

/// Legacy method that returns an iterator for MPLS vias in hardware for a given
/// label.
virtual mpls_route_via_status_iter_t mpls_route_via_status_iter(
Expand Down Expand Up @@ -187,6 +190,14 @@ class EOS_SDK_PUBLIC mpls_route_mgr : public base_mgr<mpls_route_handler,
*/
virtual void mpls_route_via_del(mpls_route_via_t const &) = 0;

/// Adds a backup via to an mpls_route_t
void mpls_route_backup_via_set(mpls_route_via_t const&);

/**
* Removes a backup via from an mpls_route_t.
*/
void mpls_route_backup_via_del(mpls_route_via_t const&);

/**
* Legacy method that returns the FEC ID corresponding to the given MPLS label if
* this route is programmed in hardware, or an empty mpls_fec_id_t otherwise.
Expand Down
4 changes: 0 additions & 4 deletions eos/policy_map.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,14 +204,12 @@ class EOS_SDK_PUBLIC policy_map_handler : public base_handler<policy_map_mgr,
*/
virtual void on_policy_map_config_set(policy_map_key_t const &);

#if TRAFFIC_POLICY_ENABLED
/**
* Callback fired when traffic policy configuration changes.
*
* @param policy_map_key_t The key identifying the updated traffic policy.
*/
virtual void on_traffic_policy_config_set(policy_map_key_t const &);
#endif

protected:
policy_map_mgr * policy_map_mgr_;
Expand Down Expand Up @@ -282,15 +280,13 @@ class EOS_SDK_PUBLIC policy_map_mgr : public base_mgr<policy_map_handler,
* that returns a policy_map_key_t as well as watch/on_foo APIs used by
* policy-map.
*/
#if TRAFFIC_POLICY_ENABLED
virtual bool traffic_policy_exists(std::string const & tpName) const = 0;
virtual traffic_policy_t traffic_policy(std::string const & tpName) const = 0;
virtual void traffic_policy_is(traffic_policy_t const & traffic_policy) = 0;
virtual void traffic_policy_del(std::string const & tpName) = 0;
virtual policy_map_iter_t traffic_policy_iter() const = 0;
virtual void traffic_policy_apply(std::string const &, intf_id_t,
traffic_policy_direction_t, bool apply) = 0;
#endif

protected:
policy_map_mgr() EOS_SDK_PRIVATE;
Expand Down
1 change: 1 addition & 0 deletions eos/types/mac_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ enum mac_entry_type_t {
MAC_ENTRY_PENDING_SECURE,
MAC_ENTRY_VPLS_DYNAMIC_REMOTE,
MAC_ENTRY_SOFTWARE_LEARNED_DYNAMIC,
MAC_ENTRY_DFW_CONFIGURED_STATIC,
};
/** Appends a string representation of enum mac_entry_type_t value to the ostream. */
EOS_SDK_PUBLIC std::ostream& operator<<(std::ostream& os,
Expand Down
11 changes: 11 additions & 0 deletions eos/types/nexthop_group.h
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,17 @@ class EOS_SDK_PUBLIC nexthop_group_t {
/** Setter for 'version_id'. */
void version_id_is(uint16_t version_id);

/**
* Getter for 'per_entry_backups': Defines whether the backup entries present in
* backup_nexthops are on a per entry basis or are a collective set of backups.
* If enabled, the backup entry in position N of backup_nexthops will be
* activated in the event that the entry in position N of nexthops is not
* available to be programmed. The flag is disabled (set to false) by default.
*/
bool per_entry_backups() const;
/** Setter for 'per_entry_backups'. */
void per_entry_backups_is(bool per_entry_backups);

bool operator==(nexthop_group_t const & other) const;
bool operator!=(nexthop_group_t const & other) const;
bool operator<(nexthop_group_t const & other) const;
Expand Down
12 changes: 12 additions & 0 deletions eos/types/nexthop_group_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,17 @@ class EOS_SDK_PUBLIC nexthop_group_impl_t {
/** Setter for 'version_id'. */
void version_id_is(uint16_t version_id);

/**
* Getter for 'per_entry_backups': Defines whether the backup entries present in
* backup_nexthops are on a per entry basis or are a collective set of backups.
* If enabled, the backup entry in position N of backup_nexthops will be
* activated in the event that the entry in position N of nexthops is not
* available to be programmed. The flag is disabled (set to false) by default.
*/
bool per_entry_backups() const;
/** Setter for 'per_entry_backups'. */
void per_entry_backups_is(bool per_entry_backups);

bool operator==(nexthop_group_impl_t const & other) const;
bool operator!=(nexthop_group_impl_t const & other) const;
bool operator<(nexthop_group_impl_t const & other) const;
Expand Down Expand Up @@ -371,6 +382,7 @@ class EOS_SDK_PUBLIC nexthop_group_impl_t {
bool hierarchical_fecs_enabled_;
bool counters_persistent_;
uint16_t version_id_;
bool per_entry_backups_;
};

/** Status for the associated nexthop group. */
Expand Down
4 changes: 2 additions & 2 deletions eos/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@

#include <eos/base.h>

#define EOSSDK_VERSION "2.23.1"
#define EOSSDK_VERSION "2.23.2"
#define EOSSDK_MAJOR 2
#define EOSSDK_MINOR 23
#define EOSSDK_PATCH 1
#define EOSSDK_PATCH 2

namespace eos {

Expand Down
32 changes: 32 additions & 0 deletions mpls_route.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ class mpls_route_mgr_impl : public mpls_route_mgr {
// TODO: No op impl.
}

void mpls_route_backup_via_set(mpls_route_via_t const & route_via) {
// TODO: No op impl.
}

void mpls_route_del(mpls_route_key_t const & route_key) {
// TODO: No op impl.
}
Expand All @@ -53,11 +57,21 @@ class mpls_route_mgr_impl : public mpls_route_mgr {
// TODO: No op impl.
}

void mpls_route_backup_via_del(mpls_route_via_t const & route_via) {
// TODO: No op impl.
}

mpls_route_via_iter_t mpls_route_via_iter(mpls_route_key_t const & key) const {
mpls_route_via_iter_t * nop = 0;
return *nop; // TODO: No op impl.
}

mpls_route_via_iter_t mpls_route_backup_via_iter(
mpls_route_key_t const & key ) const {
mpls_route_via_iter_t * nop = 0;
return *nop; // TODO: No op impl.
}

mpls_route_via_status_iter_t mpls_route_via_status_iter(
mpls_label_t const label) const {
mpls_route_via_status_iter_t * nop = 0;
Expand Down Expand Up @@ -97,6 +111,24 @@ class mpls_route_mgr_impl : public mpls_route_mgr {
}
};

// -- pimpl wrappers to mpls_route_backup functions

mpls_route_via_iter_t mpls_route_mgr::mpls_route_backup_via_iter(
mpls_route_key_t const& route_key) {
return static_cast<mpls_route_mgr_impl*>(this)->mpls_route_backup_via_iter(
route_key);
}

void mpls_route_mgr::mpls_route_backup_via_set(mpls_route_via_t const& via) {
return static_cast<mpls_route_mgr_impl*>(this)->mpls_route_backup_via_set(via);
}

void mpls_route_mgr::mpls_route_backup_via_del(mpls_route_via_t const& via) {
return static_cast<mpls_route_mgr_impl*>(this)->mpls_route_backup_via_del(via);
}

// -- end of wrappers

DEFINE_STUB_MGR_CTOR(mpls_route_mgr)

mpls_route_handler::mpls_route_handler(mpls_route_mgr *mgr) : base_handler(mgr) {
Expand Down
10 changes: 0 additions & 10 deletions policy_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,10 @@ policy_map_handler::on_policy_map_config_set(policy_map_key_t const & name) {
// TODO: no op impl.
}

#if TRAFFIC_POLICY_ENABLED
void
policy_map_handler::on_traffic_policy_config_set( policy_map_key_t const & name ) {
// TODO: no op impl.
}
#endif

class policy_map_mgr_impl : public policy_map_mgr {
public:
Expand All @@ -83,11 +81,9 @@ class policy_map_mgr_impl : public policy_map_mgr {
return false;
}

#if TRAFFIC_POLICY_ENABLED
bool traffic_policy_exists(std::string const & key) const {
return false;
}
#endif

policy_map_t policy_map(policy_map_key_t const & key) const {
return policy_map_t();
Expand All @@ -99,7 +95,6 @@ class policy_map_mgr_impl : public policy_map_mgr {
void policy_map_del(policy_map_key_t const & key) {
}

#if TRAFFIC_POLICY_ENABLED
traffic_policy_t traffic_policy(std::string const & tpName) const {
return traffic_policy_t("");
}
Expand All @@ -109,29 +104,24 @@ class policy_map_mgr_impl : public policy_map_mgr {

void traffic_policy_del(std::string const & tpName) {
}
#endif

policy_map_iter_t policy_map_iter(policy_feature_t) const {
policy_map_iter_t * nop = 0;
return *nop;
}

#if TRAFFIC_POLICY_ENABLED
policy_map_iter_t traffic_policy_iter() const {
policy_map_iter_t * nop = 0;
return *nop;
}
#endif

void policy_map_apply(policy_map_key_t const &, intf_id_t,
acl_direction_t, bool apply) {
}

#if TRAFFIC_POLICY_ENABLED
void traffic_policy_apply(std::string const &, intf_id_t,
traffic_policy_direction_t, bool apply) {
}
#endif

policy_map_hw_status_iter_t policy_map_hw_status_iter(policy_feature_t) const {
policy_map_hw_status_iter_t *nop = 0;
Expand Down
2 changes: 1 addition & 1 deletion version.m4
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
m4_define([_NAME_],[EosSdk])
m4_define([_VERSION_],[2.23.1])
m4_define([_VERSION_],[2.23.2])

0 comments on commit 8745313

Please sign in to comment.