Jon Hunter
ff48ee63b1
drivers: Fix MODULE_IMPORT_NS for Linux v6.13
...
In Linux v6.13, commit cdd30ebb1b9f ("module: Convert symbol namespace
to string literal") updated the MODULE_IMPORT_NS macro to take a string
literal as an argument in Linux v6.13. Use conftest to detect if
MODULE_IMPORT_NS takes a string literal as an argument and update the
various drivers accordingly.
Bug 4991705
Change-Id: I8f34860648965dc2334e2916d5404522510778ff
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3263798
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Brad Griffis <bgriffis@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2025-07-24 10:19:11 +00:00
Nagaraj Annaiah
731489e015
Ethernet: Add Sysfs Support to test Tx and Rx bandwidth
...
Transmit: Add test_tx_bandwidth_dump_enable support to
transmit packets from the driver which helps measure
line rate for 25G and 10G.
pkt1500, pkt8192, pkt64 packet sizes can be configured.
Receive- Drop Packets at the driver level.
Bug 4742868
Change-Id: I52fe1b73b169dfedc06afea5fb62d7bc21fd9ba1
Signed-off-by: Nagaraj Annaiah <nannaiah@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3197198
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2025-07-24 10:19:10 +00:00
Mahesh Patil
0cca8547a9
nvethernet: Add PCS BASE-R FEC sysfs
...
Adding PCS BASE-R FEC setting using sysfs node
Bug 4674473
Change-Id: I8f65d66f928c8288218bd404390e9b8117eaef15
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3201972
Reviewed-by: Nagaraj Annaiah <nannaiah@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
2025-07-24 10:19:07 +00:00
Sanath Kumar Gampa
564d844a70
nvethernet:Fix the negative values in MACSec mmc
...
Bug 4802208
Change-Id: I4bd975efa4e2668597068910eccc7e98e23de822
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3187063
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
2024-08-22 04:50:43 -07:00
Sanath Kumar Gampa
d5ff462449
nvethernet: Generate Hkey based on SAK
...
- Remove restriction to allow multicast addresses to be added to byp_lut
and sci_lut
- Also update the usage of macsec_enable node to enable/disable both Tx
and Rx traffic
- Fix the issue of generating same Hkey for differet SAK by moving the Hey
key generation logic post obtaining SAK
Bug 4715173
Bug 4715001
Change-Id: I7d3088a1f58203a474b659c7197bacc05e8510dd
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3164153
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2024-07-02 05:21:31 -07:00
Sanath Kumar Gampa
beb276a468
osd: fix mmc counters issue
...
As the mmc counters of macsec are reduced to 4 bytes update the
same in sysfs debugging
Bug 4703442
Change-Id: I02b80d876dad823a0ba302e05acd129fb4d9121d
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3163254
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Reviewed-by: Mahesh Patil <maheshp@nvidia.com >
2024-07-02 05:07:51 -07:00
Mahesh Patil
c765f98235
nvethernet: T26x EQOS changes
...
1) Added T26X EQOS bring up changes
2) Fixes added during bring up
Bug 4639097
Change-Id: I624fc5c2f9ef4304fe2ae1df6905195d7d969c68
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3152935
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
Tested-by: Seema Khowala <seemaj@nvidia.com >
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com >
2024-06-18 11:37:23 -07:00
Mahesh Patil
6bc9570126
nvethernet: T26x CAR changes
...
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/3126090
Bug 4228185
Change-Id: I74b0607de28b9a635afeae80dbc31cb79bd45f30
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
fix compilation error
Change-Id: I088609c66a180aeacf8baeb9dad0d29a38550726
2024-06-07 13:10:54 +00:00
Nagaraj Annaiah
a0d0c09294
osd: Add FRP and L2 support for t264
...
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/3004699
Bug 4334269
Change-Id: I66d2071e8ead23b99657590f731e3584653ea2b3
2024-06-07 13:10:54 +00:00
Sanath Kumar Gampa
77315f1197
nvethernet: Defature MACSEC debug buffer for T264
...
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/3016482
Bug 4134804
Change-Id: I9f5023d6dd6598bd666d4dbe68bc92106da10908
2024-06-07 13:10:54 +00:00
Sanath Kumar Gampa
6be26babe2
Nvethernet: Split MACSEC sysfs nodes
...
As PAGE_SIZE is not sufficient to accommodate 48 SC channel.
Split some of the nodes to Tx and Rx.
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2931105
Bug 4361623
Change-Id: I487e67058fa9528ae36880bb57ad848ba7d8c56a
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com >
2024-06-07 13:10:54 +00:00
Mahesh Patil
501aeb6edc
nvethernet: Macsec Bring up on T264
...
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2904856
Bug 4122114
Change-Id: I3be0d8c545f4edac678f5444044aa5ccd54b08fe
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
2024-06-07 13:10:54 +00:00
Mahesh Patil
5edac49a28
nvethernet: T264 Enable 20 VDMA channel support
...
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2940794
Bug 4043836
Change-Id: I763bfdaa78082de035219e10ef1c131bdbba5e35
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
2024-06-07 13:10:54 +00:00
Rakesh Goyal
2a104ca84d
nvethernet: T264 VDMA feature and initial bring up
...
Bug 4043836
Ported from the change -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/2896006
Change-Id: I844112cc71e387f6ae04c2cc7f64b71abb4283fd
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3149289
Tested-by: Seema Khowala <seemaj@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: Michael Hsu <mhsu@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Tested-by: Bhadram Varka <vbhadram@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2024-06-05 02:51:08 -07:00
Narayan Reddy
381d11969f
nvethernet: move err injec code to vltest
...
issue: HSI error injection logic is enabled by default
and is exposed as an ioctl which is a safety-related concern.
fix: move HSI error injection code only for
VLTEST build
Jira NET-1235
Bug 4449611
Signed-off-by: Narayan Reddy <narayanr@nvidia.com >
Change-Id: I4a15a40807466693ce673a3b9b00f51c077f2bd8
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3078250
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3132841
Tested-by: Hareesh Kesireddy <hkesireddy@nvidia.com >
Reviewed-by: Hareesh Kesireddy <hkesireddy@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com >
2024-05-17 00:20:58 -07:00
Bhadram Varka
bec1d86778
nvethernet: fix build issues with safety
...
Bug 4506095
Change-Id: Ia24590ab716d7f879ca5394b7a5512db072c4fdd
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3083506
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2024-02-28 11:20:45 -08:00
Sanath Kumar Gampa
725b8aacf1
linux:nvidia: macsec sysfs nodes only if enabled
...
Issue: Accessing the macsec sysfs nodes is leading to crash when macsec
is disabled in DT
Fix: Do not create sysfs nodes if macsec is not enabled in DT. Also
update the instance_id reading as part of ether_probe which will be
executed even when macsec is disabled
Bug 4431523
Bug 4449611
Change-Id: I354ac142b9d49852a0d5c7557a7368e1c36b0f63
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3043570
(cherry picked from commit 43136118f6a5e3cbdb09b7366f6a44ca5e52f21c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3075216
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3081231
Reviewed-by: Narayana Reddy P <narayanr@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Tested-by: Bhadram Varka <vbhadram@nvidia.com >
2024-02-28 11:20:40 -08:00
Jon Hunter
308514c910
net: nvethernet: Fix unused variable warning
...
If DEBUGFS is not enabled, then the following warning is observed ...
drivers/net/ethernet/nvidia/nvethernet/sysfs.c:3321:6:
error: unused variable [-Werror=unused-variable]
3321 | int ret = 0;
| ^~~
Fix this by ensuring that 'ret' is only defined if the DEBUGFS is
enabled.
Bug 4190165
Change-Id: I0182874592f20abe8d53b7bfdcfd099518b23f9c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2938450
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-07-19 08:47:18 -07:00
Revanth Kumar Uppala
0a8365166e
nvethernet:Fix compilation errors in Linux safety
...
Issue:
Observed below compilation issues
on the nvethernet driver for DRIVE Linux safety
builds as some macros/functions are defined with
"OSI_STRIPPED_LIB" protection but they are used
directly without any protection.
1./automotive-dev-main-20230516T005516255/out/embedded-linux-generic-release-safety/nvidia/kernel-rt_patches-nvidia-oot/nvidia-oot/drivers/net/ethernet/nvidia/nvethernet/sysfs.c:2641:33: error: ‘OSI_INSTANCE_ID_EQOS’ undeclared (first use in this function)
2641 | if (osi_core->instance_id == OSI_INSTANCE_ID_EQOS)
| ^~~~~~~~~~~~~~~~~~~~
2./automotive-dev-main-20230516T005516255/out/embedded-linux-generic-release-safety/nvidia/kernel-rt_patches-nvidia-oot/nvidia-oot/drivers/net/ethernet/nvidia/nvethernet/sysfs.c:2733:3: error: ‘dev_attr_hsi_enable’ undeclared here (not in a function)
2733 | &dev_attr_hsi_enable.attr,
| ^~~~~~~~~~~~~~~~~~~
Fix:
Add OSI_STRIPPED_LIB macro protection
for required functions.
Bug 3959085
Change-Id: Ifef1c72b5ddedc4d550280eace305bbade290bbf
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2905357
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-18 23:46:40 -07:00
Om Prakash Singh
4d63a3e291
nvethernet: avoid enabling HSI from sysfs
...
avoid enabling HSI from sysfs when virtualization is enabled.
HSI feature is enabled from ethernet-server.
Bug 3590939
Bug 4088361
Change-Id: Icd572efb24379fc8d2fc10ab1faaf0a764ee9679
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2784216
(cherry picked from commit e0754b34892b27b2577bc81ec06dd76efe81b378)
Signed-off-by: Om Prakash Singh <omp@nvidia.com >
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2897229
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-05-04 11:35:52 -07:00
Sanath Kumar Gampa
d07b3d604c
nvethernet:MACSEC, add byp lut with VF MAC
...
Issue: If the supplicant is killed for some reason Data would flow
plain on that interface, this needs to be avoided
Fix: Update bypass LUT such that if the frames from the VF(on which
supplicant is launched) is received on MACSEC either authenticate the
same or drop. Along with this handles below items as well. All the VFs MACIDs
are obtained in OSI to update the bypass LUTs to decide on which VF frames
to be authenticated and which VF frames needs to be bypassed.
1. Remove osi_macsec_en API and have single API to init and deinit
2. Remove explicit command from supplicant to set control port and
set protected frames. Handle the same in osi_macsec_init
Bug 3984665
Change-Id: I8bc8aa95d1e21e99e992b471fb70ed58073163f7
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2878515
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2023-04-21 11:35:13 -07:00
Mohan Thadikamalla
01d8319aae
nvethernet: Add Linux safety support
...
Issue:
Observed compilation issues
on the nvethernet driver
for DRIVE Linux safety builds.
Fix:
Add OSI_STRIPPED_LIB support
on nvethernet driver.
Bug 3939603
Change-Id: Id4213c1cf33dc0e925df3e627072b727ae44fa71
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2842470
(cherry picked from commit ece0eb57a89396ea8bdc412beeaa7dfabbda49b1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2879701
Tested-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-04-04 21:49:37 -07:00
Mohan Thadikamalla
8bb99f5a5d
nvethernet: Remove hsierrrptinj callback on probe
...
Don't register hsierrrptinj callbacks
on probe, only register from
sysfs inputs.
Bug 4050215
Change-Id: Ic8f8971552f5e96b8d10aa25603191206d3d317d
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2830534
(cherry picked from commit 1b053c26a00bab026285a8733b3abe1884494489)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2879714
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com >
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-31 10:11:55 -07:00
Bharat Nihalani
354ef0dbe0
drivers: Use runtime debugfs check
...
When kernel command line debugfs=off is specified instead of
disabling CONFIG_DEBUG_FS in defconfig to disable Debug-FS,
debugfs functions like debugfs_create_dir will fail.
Use function debugfs_initialized() to check if debugfs
functionality is enabled before calling any debugfs functions.
This allows us to by-pass debugfs initialization if debugfs
is not enabled.
Bug 3752450
Change-Id: I17390c2d9928638d940454c2ea1b3abf00ed4264
Signed-off-by: Bharat Nihalani <bnihalani@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2855128
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-02-10 06:17:56 -08:00
Prasun Kumar
46bc09119b
nvethernet: Fix HSI Err Rpt Inj
...
Update nvethernet for HSI Err Rpt Inj
Bug 3877863
Signed-off-by: Prasun Kumar <prasunk@nvidia.com >
Change-Id: I6171742d2ba1c55be971069643ead713e7f5c439
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2819005
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-12-05 20:36:52 -08:00
Revanth Kumar Uppala
e37e03efd9
nvethernet: Enable nvethernet driver support
...
Enable nvethernet driver support for K5.15
Bug 3793131
Change-Id: I2a6d46c9173ea633931308c34e950b404f54796d
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2801126
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-11-29 04:06:17 -08:00
Sanath Kumar Gampa
6c7d05d9bb
nvethernet: Address review comments on HSI changes
...
Bug 3590939
Change-Id: Id7bf154880a8f566a9807a3c3c7c210766d48c03
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2801131
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2806411
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
Tested-by: Revanth Kumar Uppala <ruppala@nvidia.com >
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
2022-11-29 04:06:03 -08:00
Mahesh Patil
c896399b53
nvethernet: Fix CERT INT31-C issues in sysfs.c
...
Cert error reported in
https://sccovlink:8443/reports.htm#v17826/p10248/g17826g
CID 565796
Bug 3745813
Change-Id: I1edb8bb1de6f4d28f5b1a5eaf14bc33bcb5a829c
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2765590
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-11-01 14:27:08 +05:30
Sanath Kumar Gampa
1cb18af637
nvethernet: Update the sysfs with macsec an status
...
Bug 3757857
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com >
Change-Id: I61101fcd1d8229c5e0b8e9f85aae4cea8320ef07
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2765063
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-11-01 14:27:08 +05:30
Sanath Kumar Gampa
47185d2fc3
nvethernet: macsec API cleanup
...
Cleanup of OSI macsec APIs, hence made relevant changes to OSD
Bug 3709820
Change-Id: I33a77f31553d213e565a7f4ad346fe3c026fafde
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2738231
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Sanath Kumar Gampa
6104d5e348
nvethernet:macsec:Related change to OSI misra fix
...
Fixed MISRA 15.5 and 2.5 errors in OSI hence these are the dependednt
changes in Linux OSD
Bug 3691236
Change-Id: Ie590082025235c48abb1588550121e80b92db487
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2735586
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Bhadram Varka
b1309d41ea
nvethernet: Support for variable Tx/Rx ring length
...
o Adds support for variable Tx/Rx ring length
which can be changed with ethtool.
o Using default ring size 1K for both MGBE/EQOS
if ring size values not passed from DT.
Bug 3489814
Change-Id: If90a9b2181f9fe9b4beb2ab44e27cb61026cc150
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2652964
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Sanath Kumar Gampa
1b36ff2b67
nvethernet: fix macsec osi Misra/coverity issues
...
Issue: To fix the MISRA/COVERITY defects in OSI
Some of the API names got changed
Fix: Update the OSD by using the new API name.
Addressed another issue where some of the unwanted
code is removed as MACSEC is always enabled for both
tx and Rx but not anyone of them
Bug 3460422
Change-Id: I21e64f7004fe1f7b09f863c7a68c36408198cbe2
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2618710
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-11-01 14:27:08 +05:30
Om Prakash Singh
4ae758b99b
nvethernet: add HSI support
...
1) Add threaded interrupt handler function to call EPL API
to report error.
2) add hsi_enable sysfs interface to enable HSI feature at runtime
to enable:
echo enable > /sys/devices/platform/./nvethernet/hsi_enable
to disable:
echo disable > /sys/devices/platform/./nvethernet/hsi_enable
3) For mac RX CRC and checksum error, error reporting frequency is
every one second for HSI_ERROR_THRESHOLD error count
4) Added DT property “nvidia,hsi_err_time_threshold” to specify time
threshold for error reporting
5) Added DT property "nvidia,hsi_err_count_threshold" to specify
error count threshold for error reporting
Bug 3543410
Change-Id: I73ef1a674a846295e02deff7e07954e8dada9792
Signed-off-by: Om Prakash Singh <omp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2675040
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Sanath Kumar Gampa
f35cce8a91
nvethernet: fix coverity defect
...
Issue: Fix one of the coverity issue "Dead default in switch"
Fix: Remove the default case where it is not possible to hit
Bug 3460422
CID 10127841
Change-Id: I84a4198463c92e84e88e5a9dc6c369d974b018be
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2678128
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Bhadram Varka
ad01764abb
nvethernet: fix coverity defects
...
CID 9871576 Untrusted array index read
CID 10112340 Dereference before null check
CID 10127838 Unchecked return value
CID 10127841 Dead default in switch
CID 10127905 Unchecked return value
CID 10127961 Unused value
Bug 3461002
Change-Id: If041434e57295b282dacf06ed66b1a436b96a165
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2665776
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Narayan Reddy
ccc4b0fa4f
nvethernet: add sysfs entry for phy iface mode
...
Provide a way to user to configure the phy iface
mode to any of the below modes
XFI-10G/XFI-5G/USX-10G/USX-5G
Bug 3484183
Bug 200595308
Change-Id: Ib4981da3446406d68c472346bf4ea8f569aaa720
Signed-off-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2650776
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-by: Bibek Basu <bbasu@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Mahesh Patil
4b71306a35
nvethernet: Fix err for macro MACSEC_KEY_PROGRAM
...
- Fix compiler err when macro MACSEC_KEY_PROGRAM enabled
- Add support key programming through sysfs for all macsec instances
Bug 3389496
Change-Id: Ia91fefb72182f62516104dcafa4d75dbf724b8e3
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2601541
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Nagaraj Annaiah <nannaiah@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Sanath Kumar Gampa <sgampa@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Sanath Kumar Gampa
dc3d0a02f7
nvethernet:MACSEC preempt/ctrl-port config via LUT
...
Issue: There is no provision to program the preempt or
control-port fields in SCI or BYP LUTs
Fix: Added changes in sysfs programming to add this
support
Bug 200778243
Change-Id: I60f5bb3f21a0bf5aeb72ffdbb9db376812bef4fa
Signed-off-by: Sanath Kumar Gampa <sgampa@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2600109
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Sahil Mukund Patki
9cb082dc22
nvethernet: Fix debugfs compilation error
...
Fix compilation errors in nvethernet seen when disabling
CONFIG_DEBUG_FS
Bug 200755555
Change-Id: Ib0d0fbc7502467109e1dbed6ffd03c0224e9d4aa
Signed-off-by: Sahil Mukund Patki <spatki@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2569761
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Deepak Nibade <dnibade@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Bhadram Varka
41429e6df9
nvethernet: Support of NVGRO for NVUSO segments
...
Algorithm:
- There is one master queue and one final queue to maintain the
packets.
- Final queue will start when a packet received with TTL=1
- TTL = 2 and 3 packets will be queued into final if those are in
sequence else those will be queued to master queue.
- When packet received with TTL = 2 then only merge process will start
- For every valid final queue merge starts by looking at the IPID
in master queue in increment order. This loop continues until
TTL = 2 found in master queue.
- Once TTL = 2 found then entire final queue will be given GRO
layer in sequential order.
Bug 3106903
Change-Id: I6cc08f3faae67a04813d32d59f7cce02f06dccbf
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2554423
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-11-01 14:27:08 +05:30
Bhadram Varka
583db7360a
nvethernet: add OSI core debugging
...
Dumps the registers and structures into kernel log
Bug 200737108
Change-Id: I88d63b5e46466ce036201350e2ca31cc4a2b39df
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2558998
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-11-01 14:27:08 +05:30
Mahesh Patil
b02ba38d38
nvethernet: address review comments
...
- Remove debug code under TEST macro
- Remove macsec CLK/RST hard code WAR's
- Update macsec OSI macro's as per latest OSI_ prefix
Bug 3264523
Change-Id: I8674e953e0faf49125e2326bdeb4b5bdc323a26c
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2548474
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-11-01 14:27:08 +05:30
Bhadram Varka
f972af3192
nvethernet: Add debug capabilities
...
- Dumps the descriptor dump to kernel trace buffer.
- Enable/Disable descriptor dump through sysfs.
- Dumps the register/structure dump to kernel log.
Bug 200737108
Change-Id: Ica30a881adcbd7c86771a6b441b6ffcbf813ac17
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2556684
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-11-01 14:27:08 +05:30
nannaiah
975e946c85
nvethernet: Add workqueue to set Rx mode.
...
Issue:
Network RTNL lock disables scheduler which causes IVC hang.
Fix:
- Add workqueue to set Rx mode.
- Change IVC spinlock to workqueue.
- Add virtualization check for macsec clk init.
- Add Read & Write Register.
Bug 2694285
Change-Id: I8354b500c62c0145eeed9a66bfcc8227fc8999e7
Signed-off-by: Nagaraj annaiah <nannaiah@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2520309
2022-11-01 14:27:08 +05:30
Bhadram Varka
af92743699
nvethernet: update UPHY GBE mode with DT/sysfs
...
Bug 3288030
Change-Id: Id700c2b074c3fd8968ac632e84d7cdc0d75d1e32
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2531233
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com >
2022-11-01 14:27:08 +05:30
Mahesh Patil
90a4dce1fb
nvethernet: Add aes 128/256bit macsec config
...
Adding aes 128/256 bit config support through sysfs node
Bug 3257779
Change-Id: I53b05842484d4ae0e9c51439415d35b171852574
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2484203
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Mahesh Patil
023efe53b2
nvethernet: Enable key program through TZ
...
Enabling macsec key's programming using TZ
Bug 3246511
Change-Id: I07d921018a611e4c8dd57aaa27d20a845c9af658
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2478492
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Tested-by: Bhadram Varka <vbhadram@nvidia.com >
2022-11-01 14:27:08 +05:30
Mahesh Patil
3034739537
nvethernet: Enable macsec debug feature
...
Validate input parameters and handle debug
buffer interrupts
Bug 3265346
Change-Id: I145949293e149ab93a53beea848b0869b7fa42fa
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2498053
Tested-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
2022-11-01 14:27:08 +05:30
rakesh goyal
1c87167250
nvethernet: use single API for ioctl
...
To reduce number of external OSI interface APIs,
consolidated all IOCTL API to one interface API.
OSD should use same for all interaction to OSI.
Bug 200671160
Change-Id: I2ada2746f29be6cf396709c2ec12dd96d4a5ca15
Signed-off-by: rakesh goyal <rgoyal@nvidia.com >
2022-11-01 14:27:08 +05:30