Commit Graph

36 Commits

Author SHA1 Message Date
Revanth Kumar Uppala
6c637ac71e nvethernetrm: Update Copyright year to 2023
Bug 3918941

Change-Id: Iae1cce6bb0bffaa20d601a0c5da62045ce9458fc
Signed-off-by: Revanth Kumar Uppala <ruppala@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2852448
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-02-15 22:55:00 -08:00
Bhadram Varka
e32a81bb75 osi: dma: Fix MISRA issues
===== DIFF ======
Total misra violation count changed by -162
Rule: MISRA_C-2012_Directive_4.6 Diff: -13
Rule: MISRA_C-2012_Directive_4.9 Diff: 5
Rule: MISRA_C-2012_Rule_10.1 Diff: -2
Rule: MISRA_C-2012_Rule_11.3 Diff: -15
Rule: MISRA_C-2012_Rule_11.5 Diff: 15
Rule: MISRA_C-2012_Rule_12.2 Diff: -2
Rule: MISRA_C-2012_Rule_15.1 Diff: 64
Rule: MISRA_C-2012_Rule_15.4 Diff: 5
Rule: MISRA_C-2012_Rule_15.5 Diff: -76
Rule: MISRA_C-2012_Rule_15.6 Diff: -1
Rule: MISRA_C-2012_Rule_15.7 Diff: -2
Rule: MISRA_C-2012_Rule_16.4 Diff: -1
Rule: MISRA_C-2012_Rule_2.3 Diff: -2
Rule: MISRA_C-2012_Rule_2.4 Diff: -1
Rule: MISRA_C-2012_Rule_2.5 Diff: -106
Rule: MISRA_C-2012_Rule_5.7 Diff: -1
Rule: MISRA_C-2012_Rule_5.9 Diff: -6
Rule: MISRA_C-2012_Rule_8.13 Diff: -18
Rule: MISRA_C-2012_Rule_8.2 Diff: -1
Rule: MISRA_C-2012_Rule_8.3 Diff: -2
Rule: MISRA_C-2012_Rule_8.9 Diff: -2
Rule: Total Diff: -162
*******************CERT report
Analysis summary report:
Defects/Coding rule violations found : 47 Total
	CERT_INT30-C 	 47 - (Deviation Not approved)
	Total 	 47
===== DIFF ======
Total cert violation count changed by -16
Rule: CERT_INT30-C Diff: -16
Rule: Total Diff: -16
*******************CERT ADV report
Analysis summary report:
Defects/Coding rule violations found : 36 Total
	CERT_DCL37-C (Full Deviation) 	 36 - (Deviation Approved)
	Total 	 36
===== DIFF ======
Total cert_adv violation count changed by -76
Rule: CERT_DCL37-C Diff: -62
Rule: CERT_EXP39-C Diff: -14
Rule: Total Diff: -76

JIRA NET-224

Change-Id: I2084da3d98646e6f9fb7933adbee39343e509e8d
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2744955
Reviewed-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2023-02-13 19:43:30 +05:30
Bhadram Varka
0e6dd5414d osi: dma: compile out not required code for Safety QNX
Bug 200770328

Change-Id: I8ee51c89954b47ceff5e261b6a2d8cc6b3f16f36
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2735897
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-02-13 19:43:30 +05:30
Bhadram Varka
20cc545bdc osi: dma: Support for variable Tx/Rx ring length
o Adds support for variable Tx/Rx ring length
o Default ring size 1K used if ring size passed
from OSD is zero.

Bug 3489814

Change-Id: I9c57b8d9e0c424bf39633998e0845fc97975de8f
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2652960
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-02-13 19:43:30 +05:30
vbhadram
3be293d612 nvethernetrm: mgbe: add support for RSS
This change programs 40byte Hash key and indirection table
(Hash table) (has DMA channel numbers) in MAC
Once packet received by MAC - 4-tuples will be extracted
from the packet and given to RSS hash engine. Hash function
will generate hash value by using 40byte key.
From hash value LSB bits used as index to RSS lookup table to
find out DMA channel number. If there is a match - packet is
routed to corresponding DMA channel. If there is no match -
packet will be dropped and error will be returned in receive desc.

Bug 200565647

Change-Id: Iffbb5a452f03278b3ba0bc061f09b43c7c994289
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2263398
Reviewed-by: Rakesh Goyal <rgoyal@nvidia.com>
2023-02-13 19:43:20 +05:30
Bhadram Varka
e32f28530a nvethernetrm: add support for MGBE initialization
Adds MAC CORE and DMA initialization support for
MGBE MAC Controller.

Bug 200548572

Change-Id: I6796229852b47ff0748a848a6dbe9addab6ab74f
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2250401
2023-02-13 19:43:20 +05:30
Michael Hsu
ee77dabe88 osi: increase rx/tx descriptor count
Increase number of rx/tx descriptors for better network performance.

Bug 3175332

Change-Id: I053143b3512518c6c2dbdbe0d6480ddd5bc013cc
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2444522
(cherry picked from commit 6810ca53b294bedb27e8cb275134a143a36b2e68)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2458848
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-02-13 19:43:20 +05:30
rakesh goyal
e47a928225 nvethernetrm: fix review CG and DG comments
- Include header gaurds using INCLUDED_
- Move static inline function to private
  header file.
- Move private macro to private header

Bug 200681427

Change-Id: I810184e077a5642f727e47b9280d3fb9659abd74
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2455014
(cherry picked from commit b3afc7a112460d7f92d8ef0fbe8727c7acd9ec44)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2457307
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-02-13 19:43:20 +05:30
rakesh goyal
01dd86e594 nvethernetrm: fix Misra-C 2.x, 5.9 and 8.9
Fix MISRA C-2012 Rule 2.3
Fix MISRA C-2012 Rule 2.4
Fix MISRA C-2012 Rule 2.5
Fix MISRA C-2012 Rule 5.9
Fix MISRA C-2012 Rule 8.9

Bug 200682334

Change-Id: Ie95e2f9d346d952fac1cf28f241522f35648be38
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2455622
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2457306
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-02-13 19:43:20 +05:30
rakesh goyal
5650ee6ab6 nvethernetrm: fix for Misra-C 4.6
- Fix Misra-C Rule 4.6

Bug 200682334

Change-Id: I56b1effa4e1a2f0707a26d11358de60d9d12e4f9
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2453789
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2457303
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-02-13 19:43:20 +05:30
Nagarjuna Kristam
6605b6e76f osi: dma: Add flags for rx checksum.
Issue:
- Current values for checksum flags are too
generic for QNX requirements.

Fix:
- Add specific flags for TCP/UDP, IP v4/v6
- Update value for OSI_CHECKSUM_UNNECESSARY
  to use it as a flag instead of value.

Bug 200610815

Change-Id: I7ce266594cb5bb5b1bd86ff9ab28a89d778146c1
Signed-off-by: Gaurav Asati <gasati@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2331560
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-02-13 19:43:20 +05:30
Nagarjuna Kristam
c7706f9846 osi: dma: Add TX SWCX flags for IP checksum
Issue:
In QNX OS, some data packets needs only IP checksum to be enabled.

Fix info:
Add a TX SWCX flag to update IP checksum bit to DMA descriptor.

Bug 200603660

Change-Id: I1dd6b0a0a4e8da7af548fd7640912fc3248c4da5
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2327717
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-02-13 19:43:20 +05:30
Nagarjuna Kristam
54c279c48e osi: dma: Add TX SWCX flags for payload length
Issue:
In QNX OS, IP packets are split and sent to ethernet driver. This
requires packet length update needed in DMA descriptor.

Fix info:
Add a TX SWCX flag to update payload length to DMA descriptor.

Bug 200603660

Change-Id: I3a6a2fb96d645d6ccf5c0e616ded220ed7742bc9
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2323286
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-02-13 19:43:20 +05:30
narayanr
acbb40e98f nvethernetrm: drop rx packets longer than current MTU
Issue: When JE is set, HW will accept any valid packet on Rx
upto 9K or 16K (depending on GPSCLE bit), irrespective of
whether MTU set is lower than these specific values. When
Rx buf len is allocated to be exactly same as MTU, HW will
consume more than 1 Rx desc to place the larger packet.

Fix: Drop Rx packets which are longer than currently set
MTU since HW cannot drop them.

Bug 2870545
Signed-off-by: narayanr <narayanr@nvidia.com>

Change-Id: I869f4858f8d2b502a3965dc2ca40cda8805f9886
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2308379
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-02-13 19:43:20 +05:30
Narayan Reddy
ae6f4415a9 nvethernetrm: Update comments with Doxygen style
replace kernel doc comments with Doxygen style comments

Bug 200512422

Change-Id: I2e8e1f395674ab9e1b66bf40c1f6cc0551608163
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2154252
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>
2023-02-13 19:43:19 +05:30
Narayan Reddy
b3ed543b2c nvethernetrm: add PTP support
This takes care of implementing the PTP support
which includes PTP V1/V2 over IPV4,IPV6,Ethernet,gPTP.

Bug 200524751

Change-Id: Ieb680d818be81c1a1a8349ddd9ff02bba1896b08
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2127117
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2023-02-13 19:43:19 +05:30
Srinivas Ramachandran
1418786032 nvethernetrm: Add support for HW offloads
1. ARP offload can be configured private ioctl.
   The IP address to be configured for ARP offload
   needs to be provided by application as unsigned
   char array. Refer to struct ether_ifr_data and
   struct arp_offload_param for details.

2. Tx/Rx checksum offload. Enabled by default (can
   be toggled using ethtool)

3. TCP Segmentation offload. Enabled by default (can
   be toggled using ethtool)

Bug 2571001

Change-Id: Ifcf2982557e80655e3cd7ebf3c70f49c538133b5
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2109677
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@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>
2023-02-13 19:43:19 +05:30
Narayan Reddy
1c2dbcfd78 nvethernetrm: Enable Tx packet status reporting
Added support for configuring the MTL to drop or
forward the Tx packet status to application.

Added API to clear the tx packet error stats

Bug 200515518

Change-Id: I818b4581b8bcbe84d0ca065010c60dd93726a385
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2108560
Reviewed-by: Srinivas Ramachandran <srinivasra@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>
2023-02-13 19:43:19 +05:30
Bhadram Varka
58db7892f5 nvethernetrm: support for VLAN
This patch introduce Tx/Rx packet context information
so that VLAN info can be passed from OSI to OSD in
Receive path and OSD to OSI in Transmit path.

Bug 200511721

Change-Id: I0ca21300aee2f25f9bc48006421c441abe1586f6
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2077036
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
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>
2023-02-13 19:43:19 +05:30
Bhadram Varka
304e5a0e99 nvethernetrm: osi code for EQOS
Bug 200507585

Change-Id: I70ce3d013eeb109ebf323e732820fb51c360e313
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
2023-02-13 19:43:19 +05:30
Bhadram Varka
413eeb0b04 Delete nvethernetrm to move the history from dev-main to rel-35
Bug 3918941

Change-Id: Iddf8b0f6d343490407dfafc8914dca01b4b84b4b
2023-02-13 19:42:48 +05:30
Bhadram Varka
d54e470beb osi: dma: Support for variable Tx/Rx ring length
o Adds support for variable Tx/Rx ring length
o Default ring size 1K used if ring size passed
from OSD is zero.

Bug 3489814

Change-Id: I9c57b8d9e0c424bf39633998e0845fc97975de8f
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2652960
(cherry picked from commit 1f4753bbb3)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2786266
Tested-by: Pohsun Su <pohsuns@nvidia.com>
Reviewed-by: Pohsun Su <pohsuns@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Amulya Yarlagadda <ayarlagadda@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2022-11-10 19:22:40 -08:00
Michael Hsu
e3a2e2efb4 osi: increase rx/tx descriptor count
Increase number of rx/tx descriptors for better network performance.

Bug 3175332

Change-Id: I053143b3512518c6c2dbdbe0d6480ddd5bc013cc
Signed-off-by: Michael Hsu <mhsu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2444522
(cherry picked from commit 6810ca53b294bedb27e8cb275134a143a36b2e68)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2458848
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-12-15 01:02:27 -08:00
rakesh goyal
56b160f12e nvethernetrm: fix review CG and DG comments
- Include header gaurds using INCLUDED_
- Move static inline function to private
  header file.
- Move private macro to private header

Bug 200681427

Change-Id: I810184e077a5642f727e47b9280d3fb9659abd74
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2455014
(cherry picked from commit b3afc7a112460d7f92d8ef0fbe8727c7acd9ec44)
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2457307
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2020-12-10 14:52:50 -08:00
rakesh goyal
670622893f nvethernetrm: fix Misra-C 2.x, 5.9 and 8.9
Fix MISRA C-2012 Rule 2.3
Fix MISRA C-2012 Rule 2.4
Fix MISRA C-2012 Rule 2.5
Fix MISRA C-2012 Rule 5.9
Fix MISRA C-2012 Rule 8.9

Bug 200682334

Change-Id: Ie95e2f9d346d952fac1cf28f241522f35648be38
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2455622
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2457306
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2020-12-10 14:52:46 -08:00
rakesh goyal
a744271813 nvethernetrm: fix for Misra-C 4.6
- Fix Misra-C Rule 4.6

Bug 200682334

Change-Id: I56b1effa4e1a2f0707a26d11358de60d9d12e4f9
Signed-off-by: rakesh goyal <rgoyal@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2453789
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2457303
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-by: Krishna Thota <kthota@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2020-12-10 14:52:33 -08:00
Nagarjuna Kristam
68a6f0cb46 osi: dma: Add flags for rx checksum.
Issue:
- Current values for checksum flags are too
generic for QNX requirements.

Fix:
- Add specific flags for TCP/UDP, IP v4/v6
- Update value for OSI_CHECKSUM_UNNECESSARY
  to use it as a flag instead of value.

Bug 200610815

Change-Id: I7ce266594cb5bb5b1bd86ff9ab28a89d778146c1
Signed-off-by: Gaurav Asati <gasati@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2331560
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-05-06 17:33:26 -07:00
Nagarjuna Kristam
619802cffc osi: dma: Add TX SWCX flags for IP checksum
Issue:
In QNX OS, some data packets needs only IP checksum to be enabled.

Fix info:
Add a TX SWCX flag to update IP checksum bit to DMA descriptor.

Bug 200603660

Change-Id: I1dd6b0a0a4e8da7af548fd7640912fc3248c4da5
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2327717
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-04-30 13:54:45 -07:00
Nagarjuna Kristam
2a4debf792 osi: dma: Add TX SWCX flags for payload length
Issue:
In QNX OS, IP packets are split and sent to ethernet driver. This
requires packet length update needed in DMA descriptor.

Fix info:
Add a TX SWCX flag to update payload length to DMA descriptor.

Bug 200603660

Change-Id: I3a6a2fb96d645d6ccf5c0e616ded220ed7742bc9
Signed-off-by: Nagarjuna Kristam <nkristam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2323286
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-04-30 13:54:09 -07:00
narayanr
46c199bcae nvethernetrm: drop rx packets longer than current MTU
Issue: When JE is set, HW will accept any valid packet on Rx
upto 9K or 16K (depending on GPSCLE bit), irrespective of
whether MTU set is lower than these specific values. When
Rx buf len is allocated to be exactly same as MTU, HW will
consume more than 1 Rx desc to place the larger packet.

Fix: Drop Rx packets which are longer than currently set
MTU since HW cannot drop them.

Bug 2870545
Signed-off-by: narayanr <narayanr@nvidia.com>

Change-Id: I869f4858f8d2b502a3965dc2ca40cda8805f9886
Reviewed-on: https://git-master.nvidia.com/r/c/kernel/nvethernetrm/+/2308379
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2020-03-09 12:10:51 -07:00
Narayan Reddy
77b827e51b nvethernetrm: Update comments with Doxygen style
replace kernel doc comments with Doxygen style comments

Bug 200512422

Change-Id: I2e8e1f395674ab9e1b66bf40c1f6cc0551608163
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2154252
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>
2019-08-21 13:06:08 -07:00
Narayan Reddy
efb739e01c nvethernetrm: add PTP support
This takes care of implementing the PTP support
which includes PTP V1/V2 over IPV4,IPV6,Ethernet,gPTP.

Bug 200524751

Change-Id: Ieb680d818be81c1a1a8349ddd9ff02bba1896b08
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2127117
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-06-13 23:58:04 -07:00
Srinivas Ramachandran
4e28ea7fa4 nvethernetrm: Add support for HW offloads
1. ARP offload can be configured private ioctl.
   The IP address to be configured for ARP offload
   needs to be provided by application as unsigned
   char array. Refer to struct ether_ifr_data and
   struct arp_offload_param for details.

2. Tx/Rx checksum offload. Enabled by default (can
   be toggled using ethtool)

3. TCP Segmentation offload. Enabled by default (can
   be toggled using ethtool)

Bug 2571001

Change-Id: Ifcf2982557e80655e3cd7ebf3c70f49c538133b5
Signed-off-by: Srinivas Ramachandran <srinivasra@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2109677
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-by: Rakesh Goyal <rgoyal@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>
2019-05-17 14:05:15 -07:00
Narayan Reddy
6dd7423090 nvethernetrm: Enable Tx packet status reporting
Added support for configuring the MTL to drop or
forward the Tx packet status to application.

Added API to clear the tx packet error stats

Bug 200515518

Change-Id: I818b4581b8bcbe84d0ca065010c60dd93726a385
Signed-off-by: Narayan Reddy <narayanr@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2108560
Reviewed-by: Srinivas Ramachandran <srinivasra@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>
2019-05-02 23:38:47 -07:00
Bhadram Varka
8d4ab76308 nvethernetrm: support for VLAN
This patch introduce Tx/Rx packet context information
so that VLAN info can be passed from OSI to OSD in
Receive path and OSD to OSI in Transmit path.

Bug 200511721

Change-Id: I0ca21300aee2f25f9bc48006421c441abe1586f6
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2077036
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Srinivas Ramachandran <srinivasra@nvidia.com>
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>
2019-04-17 06:44:38 -07:00
Bhadram Varka
64ce1abb9c nvethernetrm: osi code for EQOS
Bug 200507585

Change-Id: I70ce3d013eeb109ebf323e732820fb51c360e313
Signed-off-by: Bhadram Varka <vbhadram@nvidia.com>
2019-04-03 15:05:45 +05:30