SAI icon indicating copy to clipboard operation
SAI copied to clipboard

Adding additional Ether pkts stats ranges for Cisco Platforms

Open rajendrat opened this issue 1 year ago • 13 comments

Adding additional Ether Pkts in and out stats ranges requirement for Cisco Platforms.

Currently SAI supported attributes are in the range for bigger frames sizes are : 1519-2047, 2048-4095, 4096-9216 and 9217-16383 Cisco platform supported range for bigger frames sizes are : 1519-2500, 2501-9000, 9001-16383. It requires new set of Attributes to show granular stats for Cisco platforms.

Adding below Attributes:

  • SAI_PORT_STAT_ETHER_IN_PKTS_1519_TO_2500_OCTETS,
  • SAI_PORT_STAT_ETHER_IN_PKTS_2501_TO_9000_OCTETS,
  • SAI_PORT_STAT_ETHER_IN_PKTS_9001_TO_16383_OCTETS,
  • SAI_PORT_STAT_ETHER_OUT_PKTS_1519_TO_2500_OCTETS,
  • SAI_PORT_STAT_ETHER_OUT_PKTS_2501_TO_9000_OCTETS,
  • SAI_PORT_STAT_ETHER_OUT_PKTS_9001_TO_16383_OCTETS

rajendrat avatar Apr 17 '24 16:04 rajendrat

you will need to add exception for SAI_PORT_STAT_END in meta/ancestry.pl at line 180

kcudnik avatar Apr 17 '24 18:04 kcudnik

you will need to add exception for SAI_PORT_STAT_END in meta/ancestry.pl at line 180

Thanks @kcudnik. Created exception for SAI_PORT_STAT_END, still i see the meta check failure. Any input?

rajendrat avatar Apr 17 '24 18:04 rajendrat

you need to squash your commits

kcudnik avatar Apr 18 '24 07:04 kcudnik

you need to squash your commits

@kcudnik : Even after squash I see the issue. is there any skip required in CheckHash ?

rajendrat avatar Apr 20 '24 07:04 rajendrat

please read pipeline errors:

Updated 71 paths from 1b10e39
Checking for possible enum values shift (current branch vs origin/master) ...
ERROR: value of SAI_PORT_STAT_DOT3_CONTROL_IN_UNKNOWN_OPCODES differ: ../inc//saiport.h:2595 vs temp/inc//saiport.h:2583 => (178 != 172)
ERROR: value of SAI_PORT_STAT_DOT3_STATS_ALIGNMENT_ERRORS differ: ../inc//saiport.h:2569 vs temp/inc//saiport.h:2557 => (165 != 159)
ERROR: value of SAI_PORT_STAT_DOT3_STATS_CARRIER_SENSE_ERRORS differ: ../inc//saiport.h:2587 vs temp/inc//saiport.h:2575 => (174 != 168)
ERROR: value of SAI_PORT_STAT_DOT3_STATS_DEFERRED_TRANSMISSIONS differ: ../inc//saiport.h:2579 vs temp/inc//saiport.h:2567 => (170 != 164)
ERROR: value of SAI_PORT_STAT_DOT3_STATS_EXCESSIVE_COLLISIONS differ: ../inc//saiport.h:2583 vs temp/inc//saiport.h:2571 => (172 != 166)
ERROR: value of SAI_PORT_STAT_DOT3_STATS_FCS_ERRORS differ: ../inc//saiport.h:2571 vs temp/inc//saiport.h:2559 => (166 != 160)
ERROR: value of SAI_PORT_STAT_DOT3_STATS_FRAME_TOO_LONGS differ: ../inc//saiport.h:2589 vs temp/inc//saiport.h:2577 => (175 != 169)
ERROR: value of SAI_PORT_STAT_DOT3_STATS_INTERNAL_MAC_RECEIVE_ERRORS differ: ../inc//saiport.h:2591 vs temp/inc//saiport.h:2579 => (176 != 170)
ERROR: value of SAI_PORT_STAT_DOT3_STATS_INTERNAL_MAC_TRANSMIT_ERRORS differ: ../inc//saiport.h:2585 vs temp/inc//saiport.h:2573 => (173 != 167)
ERROR: value of SAI_PORT_STAT_DOT3_STATS_LATE_COLLISIONS differ: ../inc//saiport.h:2581 vs temp/inc//saiport.h:2569 => (171 != 165)
ERROR: value of SAI_PORT_STAT_DOT3_STATS_MULTIPLE_COLLISION_FRAMES differ: ../inc//saiport.h:2575 vs temp/inc//saiport.h:2563 => (168 != 162)
ERROR: value of SAI_PORT_STAT_DOT3_STATS_SINGLE_COLLISION_FRAMES differ: ../inc//saiport.h:2573 vs temp/inc//saiport.h:2561 => (167 != 161)

you shifted enum values

kcudnik avatar Apr 20 '24 08:04 kcudnik

Checking for possible enum values shift (current branch vs origin/master) ...
ERROR: value of SAI_PORT_STAT_END differ: ../inc//saiport.h:2726 vs temp/inc//saiport.h:2714 => (12294 != 12288)
enum SAI_PORT_STAT_ETHER_IN_PKTS_1519_TO_2500_OCTETS only defined in ../inc//saiport.h:2714
enum SAI_PORT_STAT_ETHER_IN_PKTS_2501_TO_9000_OCTETS only defined in ../inc//saiport.h:2716
enum SAI_PORT_STAT_ETHER_IN_PKTS_9001_TO_16383_OCTETS only defined in ../inc//saiport.h:2718
enum SAI_PORT_STAT_ETHER_OUT_PKTS_1519_TO_2500_OCTETS only defined in ../inc//saiport.h:2720
enum SAI_PORT_STAT_ETHER_OUT_PKTS_2501_TO_9000_OCTETS only defined in ../inc//saiport.h:2722
enum SAI_PORT_STAT_ETHER_OUT_PKTS_9001_TO_16383_OCTETS only defined in ../inc//saiport.h:2724
ERROR: value of SAI_PORT_STAT_END differ: temp/inc//saiport.h:2714 vs ../inc//saiport.h:2726 => (12288 != 12294)
ERROR: please correct all 2 error(s) before continue

you will need to add exception for this error, you will need to add excetpion for checkheaders.pl on line 196, and that chance in ancestry.pl is not needed

kcudnik avatar Apr 23 '24 08:04 kcudnik

i think you will also need to rebase to master

kcudnik avatar Apr 23 '24 17:04 kcudnik

i think you will also need to rebase to master

@kcudnik : Tried rebase to master, still seeing the same error.

2024-04-23T16:50:46.5235965Z ERROR: FATAL: sai_attribute_value_t members were removed on commit 636fdcd, NOT ALLOWED!

rajendrat avatar Apr 23 '24 18:04 rajendrat

no you didn't:

* 636fdcd (1997) Adding additional Ether pkts stats ranges for Cisco Platforms
| * e329bf2 (origin/master, origin/HEAD) [meta] Fix dangling pointer warning for gcc 12 (#1996)
| * 2587c3b (tag: v1.14.0, origin/v1.14) SAI Proposal for PoE Support (#1977)
|/  
* ca6b08f Update sai version to v1.14.0 (#1991)

kcudnik avatar Apr 23 '24 18:04 kcudnik

@kcudnik , @prgeor : All checks passed, could you please merge this PR.

rajendrat avatar Apr 24 '24 16:04 rajendrat

i suggest to have a RO attribute defined to indicate which range the asic support. for example, the traditional range, or this new packet size range.

we can say the RO default value is triditional range. if they asic support new range, then when application queries, it will return the range_2 for example. this allows application to write code with capability.

lguohan avatar Apr 29 '24 16:04 lguohan

@rajendrat please resolve conflicts.

rlhui avatar Sep 19 '24 22:09 rlhui

i suggest to have a RO attribute defined to indicate which range the asic support. for example, the traditional range, or this new packet size range.

we can say the RO default value is triditional range. if they asic support new range, then when application queries, it will return the range_2 for example. this allows application to write code with capability.

@rajendrat any update on this

rlhui avatar Sep 19 '24 22:09 rlhui

you will need to rebase on master, resolve conflicts and squash

kcudnik avatar Oct 02 '24 12:10 kcudnik