mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-16 04:41:03 +00:00
Merge pull request #12730 from louis-6wind/fix-ext-te-metrics
Fix for Extended TE metrics
This commit is contained in:
commit
ad1327b3d4
@ -1541,7 +1541,7 @@ static void show_ext_sub(struct vty *vty, char *name,
|
||||
sbuf_push(&buf, 4,
|
||||
"%s Average Link Delay: %u (micro-sec)\n",
|
||||
IS_ANORMAL(ext->delay) ? "Anomalous" : "Normal",
|
||||
ext->delay);
|
||||
ext->delay & TE_EXT_MASK);
|
||||
if (IS_SUBTLV(ext, EXT_MM_DELAY)) {
|
||||
sbuf_push(&buf, 4, "%s Min/Max Link Delay: %u / %u (micro-sec)\n",
|
||||
IS_ANORMAL(ext->min_delay) ? "Anomalous" : "Normal",
|
||||
|
@ -401,7 +401,7 @@ static void format_item_ext_subtlvs(struct isis_ext_subtlvs *exts,
|
||||
"%s Average Link Delay: %u (micro-sec)\n",
|
||||
IS_ANORMAL(exts->delay) ? "Anomalous"
|
||||
: "Normal",
|
||||
exts->delay);
|
||||
exts->delay & TE_EXT_MASK);
|
||||
}
|
||||
if (IS_SUBTLV(exts, EXT_MM_DELAY)) {
|
||||
if (json) {
|
||||
|
@ -484,7 +484,7 @@ enum ext_subtlv_size {
|
||||
* For Delay and packet Loss, upper bit (A) indicates if the value is
|
||||
* normal (0) or anomalous (1).
|
||||
*/
|
||||
#define IS_ANORMAL(v) (v & 0x80000000)
|
||||
#define IS_ANORMAL(v) (v & TE_EXT_ANORMAL)
|
||||
|
||||
struct isis_ext_subtlvs {
|
||||
|
||||
|
2
lib/if.h
2
lib/if.h
@ -140,7 +140,7 @@ struct if_stats {
|
||||
#endif /* HAVE_PROC_NET_DEV */
|
||||
|
||||
/* Here are "non-official" architectural constants. */
|
||||
#define TE_EXT_MASK 0x0FFFFFFF
|
||||
#define TE_EXT_MASK 0x00FFFFFF
|
||||
#define TE_EXT_ANORMAL 0x80000000
|
||||
#define LOSS_PRECISION 0.000003
|
||||
/* TE_MEGA_BIT and TE_BYTE are utilized to convert TE bandwidth */
|
||||
|
Loading…
Reference in New Issue
Block a user