aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/marvell/octeontx2
AgeCommit message (Collapse)Author
2019-10-31octeontx2-af: Init mcam resources after loading profileSubbaraya Sundeep
commit e3f9d403368f5339a345cfa0098449f465300564 from git@git.assembla.com:cavium/WindRiver.linux.git Initialize mcam resources like key width after a profile is loaded because loaded profile may change key width. Change-Id: Ia372ab9357efe6e1cb879ba3e6b8b5764b2eeb88 Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Reviewed-on: https://sj1git1.cavium.com/16397 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-10-31octeontx2-af: Do not exit when firmware unavailableSubbaraya Sundeep
commit 087085463bd075d4b14b8220bf202f8877ea203b from git@git.assembla.com:cavium/WindRiver.linux.git AF driver need not bail out when no CGX devices are found. LBK devices can be used in that case. Change-Id: Ib480e9be99da3fed6d9affcc0ba137731f8c4116 Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Reviewed-on: https://sj1git1.cavium.com/16285 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-10-31octeontx2-pf: Reset the PF/VF on MTU changeGeetha sowjanya
commit f511c212d5166756041444359251afff023f208b from git@git.assembla.com:cavium/WindRiver.linux.git Changing the MTU for high to low during packet transmission may lead to SMQ meta-descriptor enqueue error due to miss match in packet length and configured SMQ MAXLEN. Hence, reset the PF/VF inorder to flush SMQ before configuring new MTU. Change-Id: Icaa98653781907d9297431fc6a0b1d466d09b3e2 Signed-off-by: Geetha sowjanya <gakula@marvell.com> Reviewed-on: https://sj1git1.cavium.com/16447 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-10-31octeontx2-af: fix backpressure cfg on lf alloc and freeNithin Dabilpuram
commit e4804915b954374aeaa1ab524d3c9b40bd66d5e6 from git@git.assembla.com:cavium/WindRiver.linux.git Explicitly disable backpressure in CQ and Aura contexts during lf teardown to deassert backpressure on link as clearing CQ.ena or AURA.ena is not sufficient. Also enable pause frame config everytime lf is allocated to override previous configurations. Change-Id: Ibe50c11e6e7992e56979bbb9757e2f3cc3c3f519 Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Reviewed-on: https://sj1git1.cavium.com/16217 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-10-31octeontx2-pf: Add shutdown sequence for PF/VFGeetha sowjanya
commit 90c64b10f51d921844ada550493594877724686a from git@git.assembla.com:cavium/WindRiver.linux.git This patch adds pci driver shutdown support device teardown on system reboot. Change-Id: I820ee817c1b8ed399d3e309b5060334c03c5f5e5 Signed-off-by: Geetha sowjanya <gakula@marvell.com> Reviewed-on: https://sj1git1.cavium.com/16060 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-10-31octeontx2-pf: Add rx vlan offload supporthariprasad
commit f18e37bd1cf6ffe13eff7c78154e222eeb50c676 from git@git.assembla.com:cavium/WindRiver.linux.git Support vlan offload in receive path by configuring NIX to strip outer vlan. Change-Id: I3b6c6be28fe9f1804843b6cc30d18afd06d76ed5 Signed-off-by: hariprasad <hkelam@marvell.com> Reviewed-on: https://sj1git1.cavium.com/15967 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-10-31octeontx2-pf: Clear mbox interrupt status earlySubbaraya Sundeep
commit 8f3dbde036b2e6b24d68aa66cf8f980be417d987 from git@git.assembla.com:cavium/WindRiver.linux.git As long as ISR is not cleared upcoming interrupts will be lost hence clear the ISR first and queue work for processing. Change-Id: Ifd68bbbe16b91bf5640d8c7b19478f24c205da6e Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Reviewed-on: https://sj1git1.cavium.com/15919 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-10-31octeontx2-af: match nvgre as ltypeKiran Kumar K
commit 7f3d06ad12b9f5cd4cd1bcb81d6f946817401949 from git@git.assembla.com:cavium/WindRiver.linux.git Add change to match NVGRE as ltype for RSS in sync with KPU profile. Change-Id: I7ee72266dab30d60bb9d9a281ee49f73ee5d2657 Signed-off-by: Kiran Kumar K <kirankumark@marvell.com> Reviewed-on: https://sj1git1.cavium.com/15626 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-10-31octeontx2-pf: Interface Mode change using ethtool.Christina Jacob
commit ea8daebe069245b205b7bbf875113b6144edc97f from git@git.assembla.com:cavium/WindRiver.linux.git Support changing cgx link mode via ethtool. Example usage: ethtool -s ethX advertise <hex_value> Change-Id: I2e77f87c8ca0a6e684c446723f823fd51780f71e Signed-off-by: Christina Jacob <cjacob@marvell.com> Reviewed-on: https://sj1git1.cavium.com/15607 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> [Kevin: Change the definition of OTX2_ETHTOOL_ALL_MODES due to the __ETHTOOL_LINK_MODE_LAST chagne.] Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-10-31octeontx2-pf: Do not set mac address againSubbaraya Sundeep
commit aaca7982f8d0883ff2b8c17737cb18607f4cd99e from git@git.assembla.com:cavium/WindRiver.linux.git AF driver sets mac address for all PFs/VFs. Setting MAC address again in otx2_open enables RX traffic before setting up NAPI hence removed it. Change-Id: Icd6182d4428b81100c5d3d55dcddd2f2da870caa Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Reviewed-on: https://sj1git1.cavium.com/15665 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-10-31octeontx-af: Interface mode change feature via ethtoolChristina Jacob
commit eb65f5377da6cccad942ccb4c18819d8e3dc8a8a from git@git.assembla.com:cavium/WindRiver.linux.git Changes for supporting cgx link mode change using ethtool. Change-Id: I91cda92064ded056b074725016795f17aa114167 Signed-off-by: Christina Jacob <cjacob@marvell.com> Reviewed-on: https://sj1git1.cavium.com/15606 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-10-31octeontx2-pf: remove redundant changes from speed change suppcrt.Christina Jacob
commit 889b9c4ab3ab62a5f56abe05d4e9b7eb64722a0f from git@git.assembla.com:cavium/WindRiver.linux.git clean up speed change support via ethtool. Change-Id: I3c9f606f04c67c01421660bb3759331aa5fd80b0 Signed-off-by: Christina Jacob <cjacob@marvell.com> Reviewed-on: https://sj1git1.cavium.com/15605 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-10-31octeontx2-af: kpu profile fix for a missing action entryHao Zheng
commit f03662a20e69b916ae13ac28841381962814b358 from git@git.assembla.com:cavium/WindRiver.linux.git This patch fixes a problem where the catchall entry in KPU2 misses the corresponding action entry. Change-Id: I5525b5029623007af087170ca30e24592fcf8e6e Signed-off-by: Hao Zheng <haoz@marvell.com> Reviewed-on: https://sj1git1.cavium.com/15602 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-10-31octeontx2-af: kpu profile update for protocol nvgreHao Zheng
commit e849a34c43680a5dbe0bf18bc1317e0d290de3e2 from git@git.assembla.com:cavium/WindRiver.linux.git update kpu profile so that nvgre has a separate ltype LD_NVGRE instead of combined with LD_GRE Change-Id: I3ef48896470cfed83c203e430915252c359db210 Signed-off-by: Hao Zheng <haoz@marvell.com> Reviewed-on: https://sj1git1.cavium.com/15508 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-af: Add T98 devid to PTP id tableTomasz Michalec
commit 6c958e5015dd3b1307f8e4382141648c14eb3b70 from git@git.assembla.com:cavium/WindRiver.linux.git This patch allows to attach Marvell PTP Driver to the PTP device on t98. Change-Id: I7dad35443c8ad96c6529f4dd2eb6c0bdf9753013 Signed-off-by: Tomasz Michalec <tomasz@marvell.com> Reviewed-on: https://sj1git1.cavium.com/15215 Reviewed-by: Chandrakala Chavva <cchavva@marvell.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-pf: Add barrier to sync interface statusSubbaraya Sundeep
commit 446d57d2e083ee57defc821d23c52687cc880d75 from git@git.assembla.com:cavium/WindRiver.linux.git Ensure that intf_down flag is updated by using a barrier before enabling traffic. Change-Id: I61e003346030b69278d56b4d2a7bba5891470284 Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Reviewed-on: https://sj1git1.cavium.com/15093 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-pf: Fix memory leak while freeing SQBsSunil Goutham
commit b785026db2f2feec5d76d7a63421c41bc50294da from git@git.assembla.com:cavium/WindRiver.linux.git Upon enabling SQ, HW immediately fetches 2 SQB pointers from the mapped Aura, these will not be freed back to Pool once SQ is disabled. So while cleanup if we do alloc pointer from Aura and free them to kernel then 2 SQB pointers will be leaked ie never freed. Hence Aura alloc pointer cannot be used, this patch fixes this issue by saving the SQB pointers freed to Pool in the driver itself and uses that list while cleanup. Change-Id: I0ecd2a71f55d0cbf16b9d5c57ec3bc983bcb1240 Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Reviewed-on: https://sj1git1.cavium.com/15089 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-af: Add programmed macaddr to RVU pfvfVidhya Vidhyaraman
commit 203b8920a96e69616f69b4966f1b97bfb3245ea9 from git@git.assembla.com:cavium/WindRiver.linux.git This commit adds the mac address that is programmed from application into the RVU pfvf structure. The mac address retrieval will return the address from RVU pfvf structure. Change-Id: Ia9f4685b49a794dd678ed14f0e0e91d3b89de1d4 Signed-off-by: Vidhya Vidhyaraman <Vidhya.Raman@cavium.com> Reviewed-on: https://sj1git1.cavium.com/14399 Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com> Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> (cherry picked from commit 232b8af019a9b0cedcf1c82ac6592282af2c74fb) Reviewed-on: https://sj1git1.cavium.com/15064 Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-af: combine LB_STAG and LB_QINQ to one LB ltypeHao Zheng
commit 369c58581073495eae851f4813a5133cc37ef92f from git@git.assembla.com:cavium/WindRiver.linux.git NPC parser changes to combine NPC_LT_LB_STAG and NPC_LT_LB_QINQ to NPC_LT_LB_STAG_QINQ, to facilitate formulating a single MCAM entry to match on packets with one or stacked vlan tags. Change-Id: I5fa7dab5c99f2ee964123b6c81f7af695d72ba40 Signed-off-by: Hao Zheng <haoz@marvell.com> Reviewed-on: https://sj1git1.cavium.com/14808 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-af: Fix compilation issueSunil Goutham
commit 13d8c3dd95622989a2f9499b64dbf2dfa3189f44 from git@git.assembla.com:cavium/WindRiver.linux.git Fix compilation issue introduced by patch 'commit e833c99ef4dd ("octeontx2-af: Transmit packets during SMQ flush")' Change-Id: Ice1473e779d04263577e73d5e83e2d925642cdc9 Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Reviewed-on: https://sj1git1.cavium.com/14606 Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com> Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Reviewed-on: https://sj1git1.cavium.com/14930 Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-pf: Ignore NPC parser layer errorsGeetha sowjanya
commit d2a41a1a926cee01f0a2ac31a626afab33df0475 from git@git.assembla.com:cavium/WindRiver.linux.git NPC reports a layer error if none of the control flags are set in TCP packet and software drops the packets. Which is not RFC compliant. This patch fixes the issue by forwarding the packets without dropping. Change-Id: I1a2d371603124abdb2d57543478307bc13c83114 Signed-off-by: Geetha sowjanya <gakula@marvell.com> Reviewed-on: https://sj1git1.cavium.com/14568 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-af: add parser support for DSA, extended DSA and eDSAHao Zheng
commit 27cfc1441d82840fe65d3ccb00b3ae8eeda8e489 from git@git.assembla.com:cavium/WindRiver.linux.git Marvell SOHO switches support distributed switch architecture by inserting a DSA tag right after ethernet header with a tpid of 0xDADA. Marvell Falcon switches support distributed switch architecture by inserting either a extended DSA tag of 8 bytes or a eDSA tag of 16 bytes right after the ethernet SMAC. These tags don't have a tpid field. This patch provides parser support for the tags mentioned above optionally followed by a VLAN tag. For extended DSA and eDSA tags, a special PKIND of 62 is used, as these tags don't contain a tpid field. Change-Id: I1167f2a1b47793432ac4649e1f85f9621fac3bc4 Signed-off-by: Hao Zheng <haoz@marvell.com> Reviewed-on: https://sj1git1.cavium.com/13970 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-af: Transmit packets during SMQ flushSubbaraya Sundeep
commit accd6b7e1f2e7078aeaa9442862ca2165504ab2a from git@git.assembla.com:cavium/WindRiver.linux.git NIX SMQ flush may not complete if no send queue is transmitting packets. Hence packets need to be transmitted from a send queue when SMQ flush is initiated. This patch adds a SMQVF driver which is a stripped down version of VF netdev driver. The driver exports a function which can be called by AF driver during SMQ flush to transmit packets. A new VF of AF with pcifunc 17 is used for this purpose. So 17th AF VF should not attached to userspace. Change-Id: I6592f7615f33f423de2d464f7441864443f0dec4 Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Reviewed-on: https://sj1git1.cavium.com/14560 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-af: Always enable mcam rules for TXSubbaraya Sundeep
commit 010491289485c563d340d4782e33124bb00a346b from git@git.assembla.com:cavium/WindRiver.linux.git Enabling MCAM rule depends on whether the NIXLF is initialized or not. MCAM rules for TX can always be enabled because packet hitting a MCAM rule in TX path implies that it was transmitted by a initialized NIXLF. Change-Id: I59f33ec042b852253240a3c29fec0136066ad6ec Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Reviewed-on: https://sj1git1.cavium.com/14559 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-af: Use nix_smq_flush functionSubbaraya Sundeep
commit f31c3d4bd2b2c467b38940f56a361ea2f4002270 from git@git.assembla.com:cavium/WindRiver.linux.git nix_smq_flush function is available to flush all metadescriptors/packets from SMQ through PSE and the send data path. Hence use it wherever required. Change-Id: I9b2c85971b95780475182e8a5bd8d82a7ee9dd42 Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Reviewed-on: https://sj1git1.cavium.com/14558 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-pf: Use helper function for LBK VFSubbaraya Sundeep
commit 062ac62b16496d2d2d215d9712df8c9f7f225a44 from git@git.assembla.com:cavium/WindRiver.linux.git Helper function is available to check given device is LBK VF or not hence use it wherever required. Change-Id: Id0d548f51cd747fddbab7fde577d7968432b480e Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Reviewed-on: https://sj1git1.cavium.com/14476 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-af: Enable odd number of AF VFs alsoSubbaraya Sundeep
commit 16eaaa4a89729695d764d9a49203e9c257b11148 from git@git.assembla.com:cavium/WindRiver.linux.git Only even number of AF VFs are enabled currently and last VF is disabled if number of VFs is odd. Instead of disabling last VF altogether this patch enables it. There is no harm in doing so since last VF will remain with no pair for sending or receiving traffic. Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Change-Id: Ifdc0b4d90805a2c27c654f9147408b7f804d17de Reviewed-on: https://sj1git1.cavium.com/14475 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-af: Change message level to debugSubbaraya Sundeep
commit 1a16c0f852a40bba93a6f3170992fba342ca811f from git@git.assembla.com:cavium/WindRiver.linux.git Message responses may time out at sender if there is no receipent hence make the time out message as dev_dbg. Change-Id: Id68d7294f2ebe52d5530692703da2bb7c44c825a Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Reviewed-on: https://sj1git1.cavium.com/14491 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-pf: Add debug messages for MSIX alloc failureSunil Goutham
commit 59a200836fd89dd2322910d0d700c4459770ee6f from git@git.assembla.com:cavium/WindRiver.linux.git Added a debug message for MSIX vector alloc and initialization failure. Change-Id: Id8adef75b0f37150555ef39609303bdea524eb52 Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Reviewed-on: https://sj1git1.cavium.com/14427 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-pf: Use post increment STP to free pointers to AuraSunil Goutham
commit b17c623daff142f98b51c0234355bd33cc5f310e from git@git.assembla.com:cavium/WindRiver.linux.git Freeing buffer pointers to Aura needs a 128bit atomic store to two 64bit registers. A regular STP can get fissioned into two separate 64bit stores which will be ignored by Aura and buffer pointer will be lost. Hence use a post increment STP. Change-Id: I0e91250f16cfe875acdb1d2c1d051ddf90cf75de Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Reviewed-on: https://sj1git1.cavium.com/14426 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-pf: Fix interface init and shutdown sequenceSunil Goutham
commit 41bf34f01baaa784960a3e5801a414eeea92ad0d from git@git.assembla.com:cavium/WindRiver.linux.git This patch fixes multiple issues - netif_carrier_off() should be done before disabling transmit at CGX/NPC level. - Fixed SQE free count checking in otx2_xmit() - In NAPI, added a check to wakeup a TXQ if incase it was stopped earlier due to queue full. - In otx2_open() 'pfvf->intf_down' should be cleared before enabling Rx at CGX/NPC level. Otherwise if in between CQ IRQ is raised then in NAPI CQ interrupt will be disabled forever. - In otx2_stop(), RQ and SQ sizes should not be cleared, otherwise upon interface DOWN and UP, RQ size will fallback to 256 which is not supported on 96xx A0. Also if user has changed RQ/SQ size via ethtool intf DOWN and UP will reset the sizes back to default. - Fixed time and packet coalescing settings, user given value was getting shifted due to wrong type used while clamping it to within supported ranges. Change-Id: I152ce646909e64ac6ff858ba0d253f3d59ea3d8d Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Reviewed-on: https://sj1git1.cavium.com/14394 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-pf: Fix VF id in the FLR handlerSunil Goutham
commit 1ffaf44fda1307be64755ec8ccf030da724b33ea from git@git.assembla.com:cavium/WindRiver.linux.git A VF id of 64 in the FLR handler will result in BIT_ULL(64) which is useless. Change-Id: I4ff6644342829c5382e8b92123b1e4e73895a408 Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Reviewed-on: https://sj1git1.cavium.com/14393 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-af: Fix programming and logical issuesSunil Goutham
commit 94beb92ddb697cb78ded1dc4ef6cf3bb57d9b429 from git@git.assembla.com:cavium/WindRiver.linux.git Fixed many programming, logical and compilation issues. Change-Id: Iaf6b29832a1335c9167faf8c995b014048bc36f6 Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Reviewed-on: https://sj1git1.cavium.com/14392 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-pf: Fix memory leaksSubbaraya Sundeep
commit 72a3457209479c5c4556b45ab327d938f733532d from git@git.assembla.com:cavium/WindRiver.linux.git Memory allocated for structures like receive queue and refill work are not getting freed. This patch fixes that. Change-Id: I685cc6a892b69ded3a98941d7c637a2de9795e5d Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Reviewed-on: https://sj1git1.cavium.com/14185 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-23octeontx2-pf: Disply the link detected status in ethtool commandChristina Jacob
commit c6c1cc2f94e0b5d3aad0dfb23653f1e562d6f3a2 from git@git.assembla.com:cavium/WindRiver.linux.git Extend support to disply the link detected status in ethtool <interface> command. Signed-off-by: Christina Jacob <cjacob@marvell.com> Change-Id: Id859c1eabb66607e8b9f2a5c18e5cf9641327b47 Reviewed-on: https://sj1git1.cavium.com/14142 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-03octeontx2-af: Fix the using of variable length arraysKevin Hao
The Variable Length Arrays (VLAs) is not allowed to be used in the kernel codes. And a warning will be ejected after commit 8289f913fe126 ("kbuild: add -Wvla flag unconditionally"). Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-03octeontx2-pf: Add validation in ntuple delete flowhariprasad
commit be8d2544042b60c71f209bd673aedb81b33e8203 from git@git.assembla.com:cavium/WindRiver.linux.git Add proper validation to handle below cases *mcam rules are truncated *user calls ntuple off without adding any Change-Id: Ic1ab6b2ac72c7fb33b22b1cecd2fba240bf0743c Signed-off-by: hariprasad <hkelam@marvell.com> Reviewed-on: https://sj1git1.cavium.com/14087 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-03octeontx2-pf: Fix and simplify IRQ coalescing settingsSunil Goutham
commit bf8012eebdbe80d61f917e06066588711aebf08c from git@git.assembla.com:cavium/WindRiver.linux.git Current logic has +/- 1 of time_wait and mul/div by 10 of count_wait everywhere which is confusing. Also there are many scenarios where time_wait is not being set properly. This patch simplifies the logic and fixes the issues. Change-Id: If7c51d60fcc708fa9af02c28632b220b6abc5d6b Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Reviewed-on: https://sj1git1.cavium.com/14056 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-03octeontx2-pf: Fix RQ/SQ ringsize config done via ethtoolSunil Goutham
commit b6fdf3a17ec1f3fafa5b6013746d84491c17e9e6 from git@git.assembla.com:cavium/WindRiver.linux.git Current logic skips setting ringparam if interface is in down state and Tx ringsize is not changed and also doesn't display the default settings when interface is UP. This patch fixes both issues. Change-Id: If3500e161dff0a6753388c3b9ec0101b9301755d Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Reviewed-on: https://sj1git1.cavium.com/14055 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-03octeontx2-pf: Add tx vlan offload supporthariprasad
commit 89ac8ecebf53d39768c272a6432a710f0c75afcf from git@git.assembla.com:cavium/WindRiver.linux.git This patch adds below features on vlan tx side * vlan tag insertion by NIX * Make use of hardware tso feature for tagged packets. Change-Id: Ic5806bdc52e6d1b24833cfef2efa0fc32cea6fe5 Signed-off-by: hariprasad <hkelam@marvell.com> Reviewed-on: https://sj1git1.cavium.com/13974 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-03octeontx2-af: Remove express traffic supportSunil Goutham
commit 4e5ffa13e724181ad92d3351ba6079e00ae8894d from git@git.assembla.com:cavium/WindRiver.linux.git Express traffic (802.3br) support has been permenantly defeatured. Hence removed all relevant logic. Change-Id: Idb1b2d67b44a4b67a5737803d47379959f2f66b0 Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Reviewed-on: https://sj1git1.cavium.com/13934 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-03octeontx2-af: Add error messages in driver exit pathSunil Goutham
commit 3050647aa3577abea9e9d2a9f98bd444b7674163 from git@git.assembla.com:cavium/WindRiver.linux.git Added few error messages to help user identify why AF driver exited from probe() or deferred. Change-Id: I9cbc41c68e659499fb49d753d8ee17832e178763 Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Reviewed-on: https://sj1git1.cavium.com/13933 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-03octeontx2-af: Enable broadcast packet replicationSunil Goutham
commit b046cba67e64360669a043db546b514fa93a53d9 from git@git.assembla.com:cavium/WindRiver.linux.git Ingress packet replication support has been added to 96xx B0 silicon. This patch enables using that feature to replicate ingress broadcast packets to PF and it's VFs. Also fixed below issues - VFs can also install NPC MCAM entry to forward broadcast pkts. Otherwise, unless PF's interface is UP, VFs will not receive bcast packets. - NPC MCAM entry is disabled when PF and all it's VFs are down. - Few corner cases in installing multicast entry list. Change-Id: I4d169726dafe18407c1c292453e29871aab11d9c Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Reviewed-on: https://sj1git1.cavium.com/13596 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-03octeontx2-pf: support to change link speed and autonegChristina Jacob
commit 91031bb1fc62611e076fa82495f877ae6e804bb5 from git@git.assembla.com:cavium/WindRiver.linux.git Enables user to change configurations like speed, duplex mode, autoneg of a network interface via ethtool -s option. Change-Id: Ica5c1e5225449dd2b559d5439e168d1aad21a690 Signed-off-by: Christina Jacob <cjacob@marvell.com> Reviewed-on: https://sj1git1.cavium.com/13567 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-03octeontx2-af: Introduce SET_LINK_MODE command to change various ↵Christina Jacob
configurations of a network interface. commit dd5f07b9184eba3fd4f9bc4cdc00dedb0e70d7b4 from git@git.assembla.com:cavium/WindRiver.linux.git Command to change configurations like speed, duplex, autonegotiation of a network interface Change-Id: Idaca9c3b5509230ad22a50be9bec3973703e92d0 Signed-off-by: Christina Jacob <cjacob@marvell.com> Reviewed-on: https://sj1git1.cavium.com/13566 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-03octeontx2-af: report RCLK/SCLK values through mboxStanislaw Kardach
commit 486e19481142492b9deea736bd99bcacad2b747c from git@git.assembla.com:cavium/WindRiver.linux.git Report RCLK and SCLK frequencies via MBOX_MSG_READY to users. Values are read from firmware data. The mbox message values are scaled in MHz because any multiplier change will never go below 50MHz resolution. Change-Id: I423e10cd16fd8b7b5c872edde97f88a938f64abe Signed-off-by: Stanislaw Kardach <skardach@marvell.com> Reviewed-on: https://sj1git1.cavium.com/13259 Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com> Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> (cherry picked from commit c5927833062ee1f54acae0c26a4de370df64e494) Reviewed-on: https://sj1git1.cavium.com/13534 Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-03octeontx2-pf: Fix RQ CQ RED and DROP levels for 96xx B0Geetha sowjanya
commit 92a411648c892e5b7d152b451d402c4f90a19285 from git@git.assembla.com:cavium/WindRiver.linux.git CQ overflow related HW issues got fixed on 96xx B0 silicon. Hence, setting CQ RED and DROP level to minimal. Change-Id: I9516a3d641ff18df649251af89a9a66465855457 Signed-off-by: Geetha sowjanya <gakula@marvell.com> Reviewed-on: https://sj1git1.cavium.com/13438 Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com> Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Reviewed-on: https://sj1git1.cavium.com/13479 Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-03octeontx2-pf: Enable CQ interrupt coalescingGeetha sowjanya
commit d35abeb9a4cc4fc29439da8e2c8db0d04b6c84b7 from git@git.assembla.com:cavium/WindRiver.linux.git Except 96xx A0 silicon, on other silicon variants CQ timer coalescing is functioning. This patch enables over CQ IRQ coalescing. Default timer threshold is set to 1us and the same can be changed via ethtool. Change-Id: Iad1628c6d49c01dfffaeea87c30bbf25c5624918 Signed-off-by: Geetha sowjanya <gakula@marvell.com> Reviewed-on: https://sj1git1.cavium.com/13437 Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com> Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Reviewed-on: https://sj1git1.cavium.com/13446 Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-03octeontx2-pf: Support for HW TSO offloadSunil Goutham
commit 5bf8158bf4ee78d8c2a377f39aeb509bb348decb from git@git.assembla.com:cavium/WindRiver.linux.git On latest silicon 96xx B0 HW issues wrt TSO offload have been fixed. This patch enables using HW TSO offload on this silicon. Change-Id: Idf1b022566ca7bb1046d0d600b4336ea36d727d9 Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Reviewed-on: https://sj1git1.cavium.com/13436 Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com> Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Reviewed-on: https://sj1git1.cavium.com/13445 Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>
2019-09-03octeontx2-pf: Don't enable RQ RED/DROP interruptsSunil Goutham
commit d8b974f75f1722a2d0c1d4a6bb773010b609ddf5 from git@git.assembla.com:cavium/WindRiver.linux.git RQ's RED and DROP pkt interrupt's handling has been removed in earlier patches but missed unregistering the irqs. This patch removes enabling these interrupts in RQ's context. Also added more debug info to CQ and SQ error interrupts. Change-Id: I54d0c31475fa9acbf9674c574f2876571a938ddd Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Reviewed-on: https://sj1git1.cavium.com/13232 Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com> Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Reviewed-on: https://sj1git1.cavium.com/13444 Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Kevin Hao <kexin.hao@windriver.com>