Add enable/disable option for forwarding pause frame to SAI port#1262
Add enable/disable option for forwarding pause frame to SAI port#1262lguohan merged 15 commits intoopencomputeproject:masterfrom
Conversation
4a5230d to
6bae158
Compare
98cd371 to
ec8cbb4
Compare
Signed-off-by: Ze Gan <[email protected]>
|
This PR need to be discussed with Guohan further, so just draft it again. |
4f95e72 to
5d5758f
Compare
Signed-off-by: Ze Gan <[email protected]>
Signed-off-by: Ze Gan <[email protected]>
Signed-off-by: Ze Gan <[email protected]>
Signed-off-by: Ze Gan <[email protected]>
Signed-off-by: Ze Gan <[email protected]>
Signed-off-by: Ze Gan <[email protected]>
inc/saiport.h
Outdated
| * @flags CREATE_AND_SET | ||
| * @default true | ||
| */ | ||
| SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL_ALL_BITS, |
There was a problem hiding this comment.
no need this attribute.
just add a new enum.
SAI_PORT_PRIORITY_FLOW_CONTROL_MODE_DISABLED around line 192.
Signed-off-by: Ze Gan <[email protected]>
inc/saiport.h
Outdated
| typedef enum _sai_port_priority_flow_control_mode_t | ||
| { | ||
| /** Disable PFC for both rx and tx */ | ||
| SAI_PORT_PRIORITY_FLOW_CONTROL_MODE_DISABLED, |
There was a problem hiding this comment.
FYI, attributes are added in the middle of the enum will cause to shift other attributes and not be binary backward compatible
There was a problem hiding this comment.
for the attribute, i think we need to explicitly add the enum value as we have discussed @kcudnik it helps to group enum together meanwhile maintain backward compatibility.
There was a problem hiding this comment.
Make sense, should I also reorder other attributes to the end of the enum. But I think it will break a kind of readability.
Signed-off-by: Ze Gan <[email protected]>
inc/saiport.h
Outdated
| SAI_PORT_ATTR_GLOBAL_FLOW_CONTROL_MODE, | ||
|
|
||
| /** | ||
| * @brief Forward or not forward the global flow control frame |
There was a problem hiding this comment.
When not forwarded, I suppose the flow control frame is honored by the Tx MAC. Perhaps better to make that clear.
There was a problem hiding this comment.
you mean the rx flow control frame is owner by the Rx MAC?
There was a problem hiding this comment.
the forward means, when it is gearbox, it is forward the flow control frame from one side of the port to the other side of the port, it could be lineside to the systemside or vice versa.
when it is asic, it means the flow control frame will be asic to the packet core from the serdes block and asic can process the flow control frame.
There was a problem hiding this comment.
Agree - it would be less confusing to simply say the ASIC or the port terminates and honors the flow control frame.
There was a problem hiding this comment.
@dipankar-ba - do you approve this pr or anything to be revisited?
inc/saiport.h
Outdated
| SAI_PORT_ATTR_PRIORITY_FLOW_CONTROL_TX, | ||
|
|
||
| /** | ||
| * @brief Forward or not forward the PFC frame |
There was a problem hiding this comment.
When not forwarded, I suppose the PFC frames are terminated and honored by the switch ASIC. Perhaps it is better to make that clear.
inc/saiport.h
Outdated
| SAI_PORT_PRIORITY_FLOW_CONTROL_MODE_SEPARATE, | ||
|
|
||
| /** Disable PFC for both rx and tx */ | ||
| SAI_PORT_PRIORITY_FLOW_CONTROL_MODE_DISABLED, |
There was a problem hiding this comment.
the problem here is for gearbox, they do not control per bitmap. they can do disable for all priority or none. the per bit control is not supported on the gearbox.
Signed-off-by: Ze Gan <[email protected]>
Signed-off-by: Ze Gan <[email protected]>
Signed-off-by: Ze Gan <[email protected]>
|
Discussed in community meeting that #1256 should be merged in before this one. |
Signed-off-by: Ze Gan <[email protected]>
|
attributes inserted in the middle and not in the end, maybe dont merge this until we add enum values enforcement |
|
Hi Kamil,
I tried moving all attributes to the end of enums. If you notice anything
else, please let me know.
- Dipankar
…On Thu, Jul 29, 2021 at 2:57 AM Kamil Cudnik ***@***.***> wrote:
attributes inserted in the middle and not in the end, maybe dont merge
this until we add enum values enforcement
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1262 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AN3GZXIHLOI43WEIAXHIMCDT2EQX5ANCNFSM47RQYBEA>
.
|
kcudnik
left a comment
There was a problem hiding this comment.
Hi Kamil, I tried moving all attributes to the end of enums. If you notice anything else, please let me know.
both attributes are in this PR are still added int the middle of PORT enum, please add them at the end. We will allow explicit enum values to place them in the middle, probably in this week, since that change hangs for over a month, so you can ether wait or move them and the end, and after that, bringthem back to where you want
Signed-off-by: Ze Gan <[email protected]>
Hi Kamil, I moved them to the end of enums. Please review it. |
Enhance the flow control APIs including enable/disable forwarding flow control frame.
Signed-off-by: Ze Gan [email protected]