- 13 Aug, 2016 40 commits
-
-
Sunil Goutham authored
Setting BGXX_SPUX_MISC_CONTROL::RX_PACKET_DIS is not needed as packet reception is anyway disabled by BGXX_CMRX_CONFIG::DATA_PKT_RX_EN. Also setting RX_PACKET_DIS causes a bogus remote fault condition which delays link detection. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
Use standard API to generate a random RSS hash key on every boot. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Zyta Szpak authored
This patch enables parsing of inner layers for tunnelled packets. Signed-off-by:
Zyta Szpak <zr@semihalf.com> Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
This patch enables bulk freeing on the Tx side. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
Set MAC addresses only for primary VF's and don't for secondary VFs. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Jerin Jacob authored
When SQ/TXQ is reclaimed i.e reset it's stats also automatically reset by HW. This is not the case with RQ. Also VF doesn't have write access to statistics counter registers. Hence a new Mbox msg is introduced which supports resetting RQ, SQ and full Qset stats. Currently only RQ stats are being reset using this mbox message. Signed-off-by:
Jerin Jacob <jerin.jacob@caviumnetworks.com> Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Radoslaw Biernacki authored
Adding debug messages in case of NACK for a mailbox message, also did small cleanups. Signed-off-by:
Radoslaw Biernacki <rad@semihalf.com> Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
Instead of a round about way of converting buffers to SKBs and combining them into a frag list, use standard skb_add_rx_frag() API to merge page fragments. This code is useful when incoming packets are of size more than RCV_FRAG_LEN which is currently set to 2048bytes. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
This patch changes the way VF's irqs are visible in /proc/interrupts. Instead of VF id, logical interface's netdev name is used for IRQ naming and also all secondary VF's interrupts in multiqset config use primary VF's netdev name. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
83xx has 4 BGX blocks and are enabled mixed QLM/DLM configs. BGX0/BGX1 are from QLM2/QLM3, BGX3 is DLM4 and BGX2 is split across DLM5 & DLM6. This patch adds support for BGX2's split config and also enables all 4 BGXs to be used. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
83xx will have 4 BGX blocks i.e 16 LMACs, to avoid changing the same with every platform, nicpf struct elements which track LMAC related info are now allocated runtime based on platform's max possible BGX count. Also fixed configuring min packet size for all LMAC's supported on a platform. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
This patch adds RGX/RGMII interface type support to BGX driver. This type of interface is supported by 81xx SOC. CN81XX VNIC has 8 VFs and max possible LMAC interfaces are 9, hence RGMII interface will not work if all DLMs are in BGX mode and all 8 LMACs are enabled Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
This patch adds support for QSGMII interface type to the BGX driver. This type of interface is supported by 81xx SOC. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
This patch adds support for BGX module on 81xx where a BGX can be split and have different LMACs configured in different modes. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
On 88xx all LMACs in a BGX will be in same mode but on 81xx BGX can be split as two and there can be LMACs configured in different modes. These changes move lmac_type, lane2serdes fields into per lmac struct from BGX struct. Got rid of qlm_mode field which has become redundant with these changes. And now no of valid LMACs is read from CSRs configured by low level firmware and figuring out the same based on QLM mode is discarded Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
88xx has 128 VFs, 81xx has 8 VFs and 83xx will have 32VFs. Made changes to PF driver such that mailbox interrupt enable registers are configuired based on number of VFs HW supports. Also cleanedup mailbox irq handler registration code. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
Unlike 88xx, CQE_RX descriptor's tunnelling extension i.e CQE_RX2_S is always enabled on 81xx/83xx and HW does insert these fields into CQE_RX. As a result receive buffer addresses will now be present at 7th word of CQE_RX instead of 6th. Enable CQE_RX2_S on 88xx pass 2.x as well. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
81xx has only 4 CPUs, so it doesn't make sense to initialize entire Qset i.e 8 queues by default. Made changes to queue initialization to init queues equal to number of CPUs or 8 queues whichever is lesser. Also this will be applicable to VMs with VNIC VF attached and having less VCPUs Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
This patch adds info on HW maximums of 81xx/83xx and also configures receive and transmit datapaths accordingly. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
This patch adds PCI device IDs of VNIC on newer chips and also registers VF driver with them. Device id remains same for all versions of chips but subsystem device id changes. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Sunil Goutham authored
Current driver has most of the HW maximums info like no of channels, traffic limiters, RSS indices e.t.c in the form of macros. These have been moved into a 'hw_info' structure so that support for VNIC on newer chips with different set of HW maximums can be added. Signed-off-by:
Sunil Goutham <sgoutham@cavium.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Iyappan Subramanian says: ==================== Fix warning and issues This patch set fixes the following warning and issues, 1. Fix compiler warnings - drivers: net: xgene: Fix compiler warnings 2. unmap DMA memory on xgene_Enet_delete_bufpoool() - drivers: net: xgene: fix: Add dma_unmap_single 3. Delete descriptor rings and buffer pools on error - drivers: net: xgene: fix: Delete descriptor rings and buffer pools 4. Fix error desconstruction on probe() - drivers: net: xgene: Fix error deconstruction path 5. Fix RSS indirection table fields - drivers: net: xgene: Fix RSS indirection table fields 6. Change the port init sequence as per hardware specification - drivers: net: xgene: Change port init sequence 7. Fix link not recovered after link is down issue - drivers: net: xgene: XFI PCS reset when link is down 8. Fix link up is reported when no SFP+ module is plugged in issue - drivers: net: xgene: Poll link status via GPIO - dtb: xgene: Add rxlos-gpios property - Documentation: dtb: xgene: Add rxlos GPIO mapping 9. Fix backward compatibility when used with older driver - drivers: net: xgene: Fix backward compatibility - dtb: xgene: Fix backward compatibility v2: Address review comments from v1 - Fixed compiler warnings - Removed kbuild fix patch, since Arnd submitted the same - Changed Kconfig to select GPIOLIB (to fix kbuild warning) - Added rxlos-gpio documentation - Fixed backward compatibility with older driver v1: - Initial version ==================== Signed-off-by:
Iyappan Subramanian <isubramanian@apm.com> Tested-by:
Fushen Chen <fchen@apm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Iyappan Subramanian authored
This patch fixes the backward compatibility when used with older kernel. Signed-off-by:
Iyappan Subramanian <isubramanian@apm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Iyappan Subramanian authored
This patch fixes the backward compatibility on handling phy_connect(), by iterating over the phy-handle, when new DT is used with older kernel. Signed-off-by:
Iyappan Subramanian <isubramanian@apm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Iyappan Subramanian authored
Signed-off-by:
Quan Nguyen <qnguyen@apm.com> Signed-off-by:
Iyappan Subramanian <isubramanian@apm.com> Tested-by:
Fushen Chen <fchen@apm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Iyappan Subramanian authored
Added rxlos GPIO mapping by adding rxlos-gpios property. Signed-off-by:
Quan Nguyen <qnguyen@apm.com> Signed-off-by:
Iyappan Subramanian <isubramanian@apm.com> Tested-by:
Fushen Chen <fchen@apm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Iyappan Subramanian authored
When 10GbE SFP+ module is not plugged in or cable is not connected, the link status register does not report the proper state due to floating signal. This patch checks the module present status via an GPIO to determine whether to ignore the link status register and report link down. Signed-off-by:
Quan Nguyen <qnguyen@apm.com> Signed-off-by:
Iyappan Subramanian <isubramanian@apm.com> Tested-by:
Fushen Chen <fchen@apm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Iyappan Subramanian authored
This patch fixes the link recovery issue, by doing PCS reset when the link is down. Signed-off-by:
Fushen Chen <fchen@apm.com> Signed-off-by:
Iyappan Subramanian <isubramanian@apm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Iyappan Subramanian authored
This patch rearranges the port initialization sequence as recommended by hardware specification. This patch also removes, mac_init() call from xgene_enet_link_state(), as it was not required. Signed-off-by:
Iyappan Subramanian <isubramanian@apm.com> Tested-by:
Fushen Chen <fchen@apm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Iyappan Subramanian authored
This patch fixes FPSel and NxtFPSel fields length to 5-bit value. Signed-off-by:
Quan Nguyen <qnguyen@apm.com> Signed-off-by:
Iyappan Subramanian <isubramanian@apm.com> Tested-by:
Fushen Chen <fchen@apm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Iyappan Subramanian authored
Since register_netdev() call in xgene_enet_probe() was moved down to the end, it doesn't properly handle errors that may occur, by deconstructing everything that was setup before the error occurred. Signed-off-by:
Iyappan Subramanian <isubramanian@apm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Iyappan Subramanian authored
xgene_enet_init_hw() should delete any descriptor rings and buffer pools setup should le_ops->cle_init() return an error. Signed-off-by:
Iyappan Subramanian <isubramanian@apm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Iyappan Subramanian authored
In addition to xgene_enet_delete_bufpool() freeing skbs, their associated dma memory should also be unmapped. Signed-off-by:
Iyappan Subramanian <isubramanian@apm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Iyappan Subramanian authored
Fixed compiler warnings reported with -Wmaybe-uninitialized W=1, /drivers/net/ethernet/apm/xgene/xgene_enet_main.c: In function ‘xgene_enet_rx_frame’: ../drivers/net/ethernet/apm/xgene/xgene_enet_main.c:455:27: warning: variable ‘pdata’ set but not used [-Wunused-but-set-variable] struct xgene_enet_pdata *pdata; ^ ../drivers/net/ethernet/apm/xgene/xgene_enet_main.c: In function ‘xgene_enet_remove’: ../drivers/net/ethernet/apm/xgene/xgene_enet_main.c:1691:30: warning: variable ‘mac_ops’ set but not used [-Wunused-but-set-variable] const struct xgene_mac_ops *mac_ops; ^ Signed-off-by:
Iyappan Subramanian <isubramanian@apm.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Alexei Starovoitov says: ==================== bpf improvements Two bpf improvements: 1. allow bpf helpers like bpf_map_lookup_elem() access packet data directly for XDP programs 2. enable bpf_get_prandom_u32() for tracing programs ==================== Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Alexei Starovoitov authored
bpf_get_prandom_u32() was initially introduced for socket filters and later requested numberous times to be added to tracing bpf programs for the same reason as in socket filters: to be able to randomly select incoming events. Signed-off-by:
Alexei Starovoitov <ast@kernel.org> Acked-by:
Daniel Borkmann <daniel@iogearbox.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Aaron Yue authored
test various corner cases of the helper function access to the packet via crafted XDP programs. Signed-off-by:
Aaron Yue <haoxuany@fb.com> Signed-off-by:
Alexei Starovoitov <ast@kernel.org> Acked-by:
Daniel Borkmann <daniel@iogearbox.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Alexei Starovoitov authored
The helper functions like bpf_map_lookup_elem(map, key) were only allowing 'key' to point to the initialized stack area. That is causing performance degradation when programs need to process millions of packets per second and need to copy contents of the packet into the stack just to pass the stack pointer into the lookup() function. Allow such helpers read from the packet directly. All helpers that expect ARG_PTR_TO_MAP_KEY, ARG_PTR_TO_MAP_VALUE, ARG_PTR_TO_STACK assume byte aligned pointer, so no alignment concerns, only need to check that helper will not be accessing beyond the packet range verified by the prior 'if (ptr < data_end)' condition. For now allow this feature for XDP programs only. Later it can be relaxed for the clsact programs as well. Signed-off-by:
Alexei Starovoitov <ast@kernel.org> Acked-by:
Daniel Borkmann <daniel@iogearbox.net> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
Wei Yongjun authored
Fixes the following sparse warning: net/ipv6/sit.c:1129:6: warning: symbol 'ipip6_valid_ip_proto' was not declared. Should it be static? Signed-off-by:
Wei Yongjun <weiyj.lk@gmail.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
-
David S. Miller authored
Sargun Dhillon says: ==================== Add test_current_task_under_cgroup bpf helper and test This patchset includes a helper and an example to determine whether the probe is currently executing in the context of a specific cgroup based on a cgroup bpf map / array. The helper checks the cgroupsv2 hierarchy based on the handle in the map and if the current cgroup is equal to it, or a descendant of it. The helper was tested with the example program, and it was verified that the correct behaviour occurs in the interrupt context. In an earlier version of this patchset I had added an "opensnoop"-like tool, and I realized I was basically reimplementing a lot of the code that already exists in the bcc repo. So, instead I decided to write a test that creates a new mount namespace, mounts up the cgroupv2 hierarchy, and does some basic tests. I used the sync syscall as a canary for these tests because it's a simple, 0-arg syscall. Once this patch is accepted, adding support to opensnoop will be easy. I also added a task_under_cgroup_hierarchy function in cgroups.h, as this pattern is used in a couple places. Converting those can be done in a later patchset. Thanks to Alexei, Tejun, and Daniel for providing review. v1->v2: Clean up v2->v3: Move around ifdefs out of *.c files, add an "integration" test v3->v4: De-genercize arraymap fetching function; rename helper from in_cgroup to under_cgroup (makes much more sense) Split adding cgroups task_under_cgroup_hierarchy function v4->v5: Fix formatting ==================== Signed-off-by:
David S. Miller <davem@davemloft.net>
-