Commit Graph

17 Commits

Author SHA1 Message Date
Sanath Kumar Gampa
b8e03a8b43 osi:macsec: changes to send next PN to supplicant
As part of MKA, supplicant requests for Next PN
used by SecY. Added changes to OSI to send to
send the Next PN for a given SCI and AN.

Bug 3371004

Change-Id: Iaf001ba5e6b5480396e2f774a42927831160a2e5
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2614365
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-10-28 01:06:06 -07:00
Sanath Kumar Gampa
2a3bdce7c8 nvethernetrm: MTL_EST CTOV config for MACSEC
Issue: h/w requirement to change the MTL_EST value
depending on MACSEC

Fix: Change the value in MACSEC enable/disable flow

Bug 200630202

Change-Id: Iefdb14e44841941ab3e8f8c116746b0db6c63ba5
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2604830
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-10-14 12:02:52 -07:00
Nagaraj Annaiah
801815742d osi: core: macsec: Add macsec fix
Issue: macsec doesn't work for virtualization.

Fix:
1.Move virtualization checks before address check.
2. Copy PTP config to ioctl structure.

Bug 2694285

Change-Id: I81f47cf23e37a62a3e5b8ecece8ae905ec1a5df3
Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2587833
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2021-09-15 19:06:59 -07:00
Mahesh Patil
3af55e0c58 nvethernetrm: change MAC ipg as per macsec req
Change MAC ipg value as macsec IAS requirement when
macsec is used

Bug 3335658

Change-Id: Ie681bb0a66b256c32ac6093114fe29c65bf20a07
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2558031
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-09-10 02:10:19 -07:00
Mahesh Patil
f7e004c653 nvethernetrm: adjust macsec mtu configuration
Adjust macsec mtu setting as osi_core->mtu is not reducing
mtu for macsec SECTAG

Bug 200730979

Change-Id: I69399b5b9ebd04b5c2c8964bab5b6635f66cfef8
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2558623
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-07-15 17:16:57 -07:00
Mahesh Patil
330acf2e3d nvethernetrm: address review comments
- Convert primitive data type to nv_ type's
- Replace debug pr_ prints with OSI_CORE_ print macro's
- Add all macsec register macro's with prefix MACSEC_
- Update all osi function header as per 5.2 coding guidelines(PLC)
- Remove printk.h header file and use OSI_CORE_ERR macro's in all prints
- Implement clean up LUT's in add_upd_sc() and del_upd_sc()

Bug 3264523

Change-Id: Ie41097c85fbcb90ce0c4cac470fe0f068ed22247
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2548476
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: Ashutosh Jha <ajha@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-07-13 19:27:38 -07:00
nannaiah
41b0480d3b nvethernetrm: Update IVC support for macsec
1. Cleanup ivc_cmd to remove unwanted commands.
2. Update macsec IVC API's.
3. Add HAL read and write register.

Bug 2694285
Bug 2694285

Change-Id: I4d120b7bcfdc9ed65e2bf35a54fa4233a8b6e534
Signed-off-by: Nagaraj annaiah <nannaiah@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2529496
Reviewed-by: Mahesh Patil <maheshp@nvidia.com>
2021-06-21 07:07:10 +05:30
Mahesh Patil
e63cf8ff80 nvethernetrm: Remove osd callback from osi
Remove calling osd callback from osi to program SAK and
program SAK from OSD itself.

Bug 3308383

Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Change-Id: I2b27cea66bd9770aec52ed53ba430eb276cf73f7
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2528707
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-06-21 07:07:10 +05:30
Mahesh Patil
d3fd593f50 nvethernetrm: Update mac/macsec init
Update mac/macsec init programming
1. macsec clock and reset programming order at init and deinit
2. macsec SOT values as per macsec IAS
3. mac IPG values as per macsec IAS

Bug 3266535

Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Change-Id: Ie6351f632b0ac7487ec7b5bfd34d9337d3782a59
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2506488
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-06-21 07:07:10 +05:30
Bhadram Varka
1858fe9406 osi: macsec: fix build issue
Bug 200722499

Change-Id: I75cd89350954bc8ed7632ec0788d2efe7c6848aa
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2522868
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Gaurav Asati <gasati@nvidia.com>
2021-06-21 07:07:10 +05:30
Mahesh Patil
96cd8fb10d nvethernetrm: Add aes 128/256bit macsec config
Adding aes 128/256 bit config support through sysfs node

Bug 3257779

Change-Id: Ic1736b309a28faa7591184167a94156ca816fb57
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2484200
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2021-06-21 07:07:10 +05:30
Mahesh Patil
474ed78e6d nvethernetrm: Enable key program through TZ
Enabling macsec key's programming using TZ

Bug 3246511

Change-Id: I1e7633b042e1ebedef78fff9812aeaaa2480a1c4
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2478489
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2021-06-21 07:07:10 +05:30
nannaiah
6644553603 osi: Add virtualization fix.
- Change osi_readl to osi_readla
- Change osi_writel to osi_writela
- Add IVC macsec commands.
- Add OSI_MGBE_MAC_3_00 as valid list of version.
- Disable validate_func_ptrs as it returns failure.

Bug 2694285
JIRA T23XMGBE-118

Signed-off-by: Nagaraj annaiah <nannaiah@nvidia.com>
Change-Id: I49187c0decb3de4184b7ef5e3a2e553a60c1d54f
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2515254
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2021-06-21 07:07:10 +05:30
Mahesh Patil
2e5440e9e4 nvethernetrm: Enable macsec debug feature
Validate input parameters and handle debug buffer interrupts

Bug 3265346

Change-Id: I8a7ebf66d20867fe4fb890d7d09d044d15108a17
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2496672
Tested-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
2021-06-21 07:07:10 +05:30
Mahesh Patil
5d26aedc95 nvethernetrm: Use correct sc start_idx in delete
Use correct sc start_idx when deleting SC/AN

Bug 3206033

Change-Id: I38fc92c743e905d04a5cdc671b5cb59f55ba7c97
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
2021-06-21 07:07:10 +05:30
Mahesh Patil
f6fe93c7e5 nvethernetrm: Update mmc counter properly
Don't add accumulated previous counter value when
counter is updated with latest value. Register value
itself is accumulated counter.

Bug 200688810

Change-Id: I93c971724557813a317cc118ce1b4459b9772d83
Signed-off-by: Mahesh Patil <maheshp@nvidia.com>
2021-06-21 07:07:10 +05:30
Srinivas Ramachandran
3be3b7a90c nvethernetrm: Add support for MACsec controller
This commit adds support for MACsec controller HW
operations. The MACsec HW ops can be accessed via
osi_core layer.

Currently, MACsec HW is enabled when MAC interface
is brough up, with no LUT entry so that packets
will still be bypassed. MTU check is enabled and
default interrupts are enabled for statistics.

Bug 2913560

Change-Id: I62e8567fac6603db47f4069a40458038f9b4178a
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
2021-06-21 07:07:10 +05:30