Mahesh Patil
7e2c08add0
nvethernet: Allow more than 31 l2 filter index
...
Ported from -
https://git-master.nvidia.com/r/c/nvethernet-docs/+/3027949
Bug 4297989
Change-Id: Ic978dc44dd2d16b03effc5322d2470a238c7ccc9
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
Hareesh
5c21e5aafb
nvethernet: fix 5.7 misra issues
...
- Fixed 5.7 misra issues
Bug 3697619
Bug 4449611
Change-Id: I18c3a974ecf01e6981e4f12cbfab040ef7cfa4ca
Signed-off-by: Hareesh Kesireddy <hkesireddy@nvidia.com >
(cherry picked from commit a39b7769b1392d3948160fdcb31ed8765e680882)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3074671
(cherry picked from commit c37e93314db10145238bd5784dfbfca10b60012f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3081222
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:25 -08:00
Ankita Garg
7c81eb1b54
nvethernet: Fix build error when !OSI_STRIPPED_LIB
...
ioctl_data and osi_core are defined only when !OSI_STRIPPED_LIB. Fix
error in the code that accesses these variables outside the #ifndef
Bug 3974840
Change-Id: Ib0219dd0f7d9517bee2bec00ee7c546fd6e210e5
Signed-off-by: Ankita Garg <ankitag@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2917512
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-06-14 22:56:06 -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
Rakesh Goyal
dd7632c195
nvethernet: fix syntax error in fpe ioctl
...
Issue: Due to syntax error, only 1 byte getting
copied from user space to kernel space.
Fix: Fix syntax error. Add error logs
Bug 3991771
Change-Id: Iff96d0f51605fab2954c1c9a423ad9a6781c1e21
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2866442
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: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2023-03-07 22:52:15 -08:00
Hareesh Kesireddy
32b805cab1
nvethernet: remove unnecessary ioctls
...
- Removed IPV4/IPV6/TCP/UDP ioctls.
- Added support for single L3L4 ioctl which supports all of the above.
Bug 3825731
Change-Id: Iae3cee595258abf8c908dae5a214d9da9bc8ae80
Signed-off-by: Hareesh Kesireddy <hkesireddy@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2819351
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-12-05 20:41:29 -08:00
Hareesh Kesireddy
db62bc86bb
nvethernet: update l3l4 filter handling
...
Modified l3l4 filter ioctls based on corresponding osi changes.
Bug 3576506
Bug 3825731
Change-Id: Id9a4ce263f3526e4c5a357d74f9d55ebb59fef29
Signed-off-by: Hareesh Kesireddy <hkesireddy@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2803367
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-11-30 06:17:02 -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
Bhadram Varka
0772521bf1
nvethernet: remove save/restore register IOCTL code
...
Bug 3701869
Change-Id: I8b4e67aa6420a46fda7185261c8ecbac0db90f40
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2787485
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: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-11-01 14:27:08 +05:30
Rakesh Goyal
e7ff48aaad
nvethernet: update code to use new structure
...
Remove not required members of ifr_data structure.
Add structure in exported header file.
Add support in code to understand new data structure.
Bug 3704251
Change-Id: I495b34edaa6ac324933508c12a3612de4a52175b
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2782590
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com >
2022-11-01 14:27:08 +05:30
Rakesh Goyal
36df82d64b
nvethernet: support for adding L2 filter
...
Support to add L2 filter uing ioctl
when Ethernet virtulization is enabled
Bug 3659048
Change-Id: Ib990bf5fa5762f01563b1017b8d3e0c8b02320a6
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2777262
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@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
Om Prakash Singh
fc25e06026
nvethernet: add interface to configure debug interrupt
...
Add ioctl ETHER_DEBUG_INTR_CONFIG to enable and disable
debug related interrupt at runtime
Bug 3600647
Change-Id: Ie22a7decc1bd2feb90126841a8d8a0eaafa7dc66
Signed-off-by: Om Prakash Singh <omp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2703340
Reviewed-by: Bhadram Varka <vbhadram@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
Bibhay Ranjan
4feb5075e4
nvethernet: fix code defects
...
Issue: SPARSE issues
Fix: Fix as per the given guidelines in the error
Bug 3568991
Change-Id: I983576d7bea30d87905c06030baed6574e2bdb96
Signed-off-by: Bibhay Ranjan <bibhayr@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2688521
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
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
Rakesh Goyal
97ef73e663
nvethernet: ioctl support for MAC to MAC tsync configuration
...
Add support for configure M2M sync for secondary interface
using ioctl.
Bug 200733666
Change-Id: I87f31c26f11b0eee346fd7dcbbeabb8450e1b456
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2614950
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Rakesh Goyal
40c8f17f0f
nvethernet: ioctl to support TSC-PTP time capture
...
Add driver private IOCTL support to capture and
return capture timestamps to userspace.
Bug 200736396
Change-Id: I012f318ca16ab56f295b427846a74379d8d3ccec
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2554285
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Gaurav Asati <gasati@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@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
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
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
Mahesh Patil
4318bd4ebb
nvethernet: pad calibration
...
Issue:
1. Current pad calibration does not check for RGMII/MDIO
interfaces idle
Fix:
1. Make sure RGMII and MDIO interface are idle before
doing pad calibration as per spec
Bug 2831220
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
Change-Id: Ie4a7fadb2f2851c0d3eb62c1cd05f8e16d529931
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2321644
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Ajay Gupta <ajayg@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Rakesh Goyal
8553696ea7
nvethernet: use real-time API to get current time
...
Issue: PTP configuration API is using monolithic
time API.
Fix: Use real-time API to get correct system time.
Bug 200666019
Change-Id: Ie6a8fd819a70f3c257ce214fae937356840a5421
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2533453
Reviewed-by: svcacv <svcacv@nvidia.com >
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
GVS: Gerrit_Virtual_Submit
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
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
Mohan Thadikamalla
c651869a94
nvethernet: Enable PTP offload support
...
Code to provide IOCTL to enable PTP offload.
Bug 200562286
Change-Id: Idea085979760182e6e832963afb316c7fe508f79
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2319555
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Tested-by: Bhadram Varka <vbhadram@nvidia.com >
2022-11-01 14:27:08 +05:30
Mohan Thadikamalla
9f70a55384
nvethernet: Add Multiple DMA channels route
...
- Add a new DT node to enable Multiple DMA routing
for netdev MC MAC ddress. Read the DT value
and store it into OSI core private data.
- Add new driver private IOCTL for MC DMA channels
selection as inputs and call ether_set_rx_mode
to update MAC filters with given DMA channels route.
Bug 200565911
Change-Id: I1e65322489e34c4b6318a769dac963073d4887ad
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
2022-11-01 14:27:08 +05:30
Mohan Thadikamalla
c2f3c724bd
nvethernet: Add FRP command IOCTL support
...
Add new private IOCTL to perform
Flexible Receive Parser table entry
add, delete, and update operations
using OSI API call.
Bug 200565623
Change-Id: I00f2be1aaa6ee737de5154085be0521db0bb9593
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2331371
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
2022-11-01 14:27:08 +05:30
Rakesh Goyal
f244049a90
nvethernet: TSN support
...
Initialize TSN and ioctl support for configuration
Bug 200561100
Change-Id: Ic8a488de7850b63a593db69e626b19ad139811a1
Signed-off-by: rakesh goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2319819
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
2022-11-01 14:27:08 +05:30
Mohan Thadikamalla
7f172a52f5
nvethernet: Add PTP RX queue support
...
- Define new "nvidia,ptp_rx_queue" DT node entry
- Read "nvidia,ptp_rx_queue" DT node value into
osi_core->ptp_config.ptp_rx_queue. On no DT
entry case set this value to "osi_core->mtl_queues[0]"
- Validate "osi_core->ptp_config.ptp_rx_queue" value
with "osi_core->mtl_queues" array values. If no match
found give error and set this value to
"osi_core->mtl_queues[0]"
- Add new private IOCTL command to call OSI RX route API.
Bug 200596985
Change-Id: I2c05d4c6f3f4207d9efd6b6777d29fe2409de1a3
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2312295
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com >
2022-11-01 14:27:08 +05:30
Bhadram Varka
93924a32f3
Revert "nvethernet: use single API for ioctl"
...
This reverts commit 5bbeaa61e89ee6375a15020f2ef533b5ed66d628.
2022-11-01 14:27:08 +05:30
rakesh goyal
f4d30eb89b
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: I05324777c9bd7ed3c167e4f8a629af2e695389d2
Signed-off-by: rakesh goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2493248
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-11-01 14:27:08 +05:30
Mohan Thadikamalla
89c9124052
nvethernet: Add TXQ, RXQ and Speed get IOCTLs
...
Bug 200598154
Change-Id: Ic53b56ba59e99366583b133ada4550b5e3cb36aa
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2329743
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Anu Priya <apriya@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: Anu Priya <apriya@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Mohan Thadikamalla
c547794a00
nvethernet: Add save/restore command
...
Add a new private IOCTL command to
configure MAC register save and
restore operations from user space.
Bug 200596517
Change-Id: Ic0e7069e064e277b842b5fd3ceb7ea17327687d5
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2315790
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: automaticguardword <automaticguardword@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Mahesh Patil
8c6d96126b
nvethernet: Enforce admin permission for ioctl
...
Issue: Any app without admin permission can change
MAC configuration using priv ioctl's
Fix: Enfore admin permission check during priv ioctl call.
Block ioctl call if the calling application does
not have admin permission.
Bug 2825193
Change-Id: I0d1e0b13b3579d451ea7a75678766a27cd6ffca2
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2287375
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Ajay Gupta <ajayg@nvidia.com >
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
GVS: Gerrit_Virtual_Submit
2022-11-01 14:27:08 +05:30
Srinivas Ramachandran
20e4a2fb7a
nvethernet: Call netif_carrier_on/off based on PHY link
...
Issue: When configuring loopback mode, netif_carrier_on/off
APIs are directly used i.e, netif_carrier_on when
loopback mode enabled, netif_carrier_off when
loopback mode is disabled. If anyone enables/disables
loopback mode when link is alreay up, then link is
not restored. Stack is not sending packets due
to netif_carrier_off.
Fix: Check PHY link status before calling netif_carrier_*
APIs. If link is up, then PHY framework would have
already invoked these APIs.
Bug 200512681
Change-Id: I1e07df202a8915737be8992f838aa5bd5534c512
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2267401
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@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 >
2022-11-01 14:27:07 +05:30
Mahesh Patil
9fec12055d
nvethernet: Check invalid MC/BC IPv4 address
...
Issue: Validate multicast/broadcast IP address while handling
private IOCTL to enable ARP offload
Fix: Validated multicast/broadcast IP address while handling
private IOCTL to enable ARP offload
Bug 2715374
Change-Id: I2b0e7ec75921e077e099baf6817908f2dc7683b8
Signed-off-by: Mahesh Patil <maheshp@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2248256
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: Ajay Gupta <ajayg@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-11-01 14:27:07 +05:30
Mohan Thadikamalla
ae038d9360
nvethernet: Enable slot function support
...
Issue:
Data packets sent via EQOS hardware are not
following any packet gaping. The AVB use-cases
have different timing requirements for class A
data packets. For example, the time difference
between two class A data packets are supposed
to be 125 microseconds for audio data
of frequency 48 kHz.
Fix:
Enable slot function support to schedule the data
fetching from the system memory by the DMA.
This feature is useful when the source AV data
needs to be transmitted at specific intervals.
Bug 200545374
Change-Id: I549014998380cd6c0d161c778bccdaa5ed017129
Signed-off-by: Mohan Thadikamalla <mohant@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2223850
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-11-01 14:27:07 +05:30
Rakesh Goyal
c45ba21f05
nvethernet: eqos: Use single API to enable/configure filter
...
Update OSI driver calls in ioctl path and set_rx_mode
to use single API
Bug 2715384
Change-Id: I521471060a31b985ea2f17a1e5ef91830820c285
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2216069
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srinivas Ramachandran <srinivasra@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 >
2022-11-01 14:27:07 +05:30
Rakesh Goyal
c080c796e2
nvethernet: remove spin locks and re-initialize private variable
...
Issue:
1) Spin locks are used for code path which is already serialized
by network stack
2) On interface down/up, MAC registers are getting reset and
re-initialized but private structure variables are not updated
Fix:
1) Remove spinlocks
2) Re-initialize private structure variables
Bug 200548252
Bug 200547544
Change-Id: Ifb0ce27ba96f8657eebde21e5d02d8b36fb1778b
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2189974
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-11-01 14:27:07 +05:30
Bhadram Varka
58301a3ef2
nvethernet: Update comments with Doxygen style
...
replace kernel doc comments with Doxygen style comments
Bug 200512422
Change-Id: I1445cab3fb6708ddc21b4bfacebe213ed22f7aa2
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2180213
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Tested-by: Narayan Reddy <narayanr@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-11-01 14:27:07 +05:30
Srinivas Ramachandran
c3ed68143b
nvethernet: Add IOCTL handler to config loopback mode
...
MODS tests use private IOCTL to configure MAC loopback mode.
Add a priv ioctl handler to support this in nvethernet driver.
nvethernet driver also has a sysfs knob to configure loopback.
Bug 2665785
Change-Id: I7f488fe81a0772a0881dbba48592bbcd11205dbf
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2166181
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-11-01 14:27:07 +05:30
Rakesh Goyal
4fcd7633cd
nvethernet: fix eqos ioctls for MAC filter validation app
...
Issue:
1) EQOS_UDP_FILTERING_CMD: SW check for VLAN Hash Filter hw feature
along with user input.
2) EQOS_UDP_FILTERING_CMD/EQOS_TCP_FILTERING_CMD: SW don't set IPFE bit
in MAC packet filter register.
Fix:
1) No need to check for VLAN hash filter hw feature as Hash
filtering is not supported in SW.
2) Call osi_config_l3_l4_filter_enable if MAC filter register already
not configured for L3/L4 filtering.
Bug 200512422
Change-Id: I2cba199f57b79b7357663d39c8e2281f4b49bda8
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2148361
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-11-01 14:27:07 +05:30
Rakesh Goyal
8c7d9510f2
nvethernet: support filter based dma routing API
...
Updated IOCTL path to not get impacted with new API
change. OSI call should be done with correct parameters
1) dma_routing_enable
2) dma_chan and
3) addr_mask (for L2 filtering) to support new IOCTL
4) src_dest (for L2 filtering) to support new IOCTL
Included logic for User priority based RxQ selection. We can have DT
entry "nvidia,rx_queue_prio" to configure this setting
i.e. for valid following Queue mapping
Priorities 6,3 to Queue 3
Priorities 4,5 to Queue 2
Priority 0 to Queue 1 and
Priority 1 to Queue 0.
setting will be nvidia,rx-queue-prio = <0x2 0x1 0x30 0x48>;
If static channel selection, i.e. RXQtoDMA set with value 0x03020100,
Priorities 6,3 to Queue 3 to chan 3
Priorities 4,5 to Queue 2 to chan 2
Priority 0 to Queue 1 to chan 1 and
Priority 1 to Queue 0 to chan 0
else if DCS(dma channel selection) enabled
channel will be selected based on filter rules.
Included logic to take input from User On DCS enable or disable. User can
update dt entry "nvidia,dcs-enable", for dcs enable disable for all queue.
i.e nvidia,dcs-enable = <0x1> will enable DCS for all queue.
Bug 200525721
Change-Id: I4ba820f178b03424d01bb4ddd1f1d6eadde572f7
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2133196
GVS: Gerrit_Virtual_Submit
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-by: Sachin Nikam <snikam@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-11-01 14:27:07 +05:30
Rakesh Goyal
6a3fdf61b3
nvethernet: enable MAC filter
...
Functions added to support filter setting from Network
stack as well as from customized app using ioctl.
Bug 200512993
Change-Id: Id9a7712242ef229969d7c476c85171509ab53d73
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2111084
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Narayan Reddy <narayanr@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 >
2022-11-01 14:27:07 +05:30
Srinivas Ramachandran
e05030a4e2
nvethernet: Add support for ioctls and HW offloads
...
1. ARP offload can be configured via private ioctl.
Application requesting the arp offload configuration
should provide the IP address to be configured for
ARP offload via ioctl data struct. Refer to
struct ether_ifr_data and
struct arp_offload_param for details.
2. Tx/Rx Checksum offload can be configured via ethtool
3. TCP Segmentation offload can be configured via ethtool
Bug 2571001
Change-Id: If639ab9049db97f200911af456ddb8cb8433fa12
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2109676
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Ashutosh Jha <ajha@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-11-01 14:27:07 +05:30
Rakesh Goyal
79e4abea9c
nvethernet: implement get avb algorithm settings
...
Implementation of new private IOCTL to get current AVB
settings at user space.
Bug 200512422
Change-Id: I6800778f0ab74ecc58c3813967c79ca11fae5124
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2112643
Reviewed-by: Narayan Reddy <narayanr@nvidia.com >
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com >
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-11-01 14:27:07 +05:30
Rakesh Goyal
4e30306bac
nvethernet: add support for 802.1Qav (CBS)
...
Code added for
1) Customized application to configure avb setting
2) ndo_select_queue support to identify queue based on
user priority.
Bug 200512771
Change-Id: I6468aa838567e50885931f10d49126870f1e25c4
Signed-off-by: Rakesh Goyal <rgoyal@nvidia.com >
Reviewed-on: https://git-master.nvidia.com/r/2108339
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com >
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com >
2022-11-01 14:27:07 +05:30