-
Notifications
You must be signed in to change notification settings - Fork 582
[macsecorch]: Add IPG adjusting for MACsec gearbox model #1925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
f3359eb
to
6697fc2
Compare
Signed-off-by: Ze Gan <[email protected]>
6697fc2
to
3ce68b2
Compare
Signed-off-by: Ze Gan <[email protected]>
Signed-off-by: Ze Gan <[email protected]>
orchagent/port.h
Outdated
@@ -28,6 +28,9 @@ extern "C" { | |||
|
|||
#define VNID_NONE 0xFFFFFFFF | |||
|
|||
// Default inter-packet gap(IPG) is 96 which is recommended by IEEE 802.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Recommend adding 'bits' after 96 in comment line just to be explicit, clear
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, Add it.
Signed-off-by: Ze Gan <[email protected]>
orchagent/macsecorch.cpp
Outdated
SAI_MACSEC_DIRECTION_INGRESS); | ||
}); | ||
|
||
if (phy) | ||
{ | ||
if (!adjustIPG(port, phy->macsec_ipg)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is IPG is mandatory parameter? I think it should be optional and every platform may not support this. So I feel you may need check here that if config comes from gerarbox then only adjust if not don't attempt to adjustIPG.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sense, fixed it.
orchagent/macsecorch.cpp
Outdated
attr.id = SAI_PORT_ATTR_IPG; | ||
attr.value.u32 = ipg; | ||
|
||
sai_status_t status = sai_port_api->set_port_attribute(port.m_port_id, &attr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this SET operation forwarded to NPU or PHY? IPG is configurable property for the port managed by ASIC right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IPG configuration will be executed by NPU(Switch ASIC). And it should be a configurable property for the port managed by ASIC.
Signed-off-by: Ze Gan <[email protected]>
0a292ec
to
7ac152a
Compare
Signed-off-by: Ze Gan <[email protected]>
lack of swss vs test. please add. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add swss vs test cases.
…9202 (sonic-net#1925) * [flex counter] Flex counter threads consume too much CPU resources. #9202 Increase the interval up lmit from 30 seconds to 60 seconds * only modify the interval of watermark counter group * fix merge conflict * fix commit issue
Signed-off-by: Ze Gan [email protected]
What I did
If the MACsec use gearbox model, to adjust the IPG in the system port to the required IPG in the corresponding gearbox at the creating MACsec port stage, and reset the default IPG at the removing MACsec port stage.
Why I did it
Gearbox will increase few bits for MACsec header, if the system port use the default IPG, the gearbox maybe cannot meet the minimum required IPG.
How I verified it
Waiting for a test.
Details if related
Wait for SAI updated to https://github.com/opencomputeproject/SAI/pull/1253/files