summaryrefslogtreecommitdiff
path: root/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.h
AgeCommit message (Collapse)Author
2017-12-12staging: fsl-dpaa2/eth: Don't include HH_DATA_MOD in needed_headroomBogdan Purcareata
The network stack will take care to reserve space for HH_DATA_MOD when building the skb, so there's no need to account for it in the netdevice needed headroom. Based on that, decrease the frame buffer headroom for ingress frames. Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> Integrated-by: Guanhua Gao <guanhua.gao@nxp.com>
2017-12-12staging: fsl-dpaa2/eth: Update Rx headroom computationBogdan Purcareata
Instead of the old opaque value, define the Rx buffer headroom size based on other frame buffer fields, in accordance to how we expect them to be configured by MC. Based on DPNI_BUF_LAYOUT_OPT_TIMESTAMP, MC will enable an additional field in the Tx hardware annotation area, increasing its size to 128. Update the driver value to reflect this. Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com> Integrated-by: Guanhua Gao <guanhua.gao@nxp.com>
2017-12-12staging: fsl-dpaa2/eth: Fix compiling errors for backporting dash-ltsGuanhua Gao
Fix compiling errors for backporting dash-lts. Signed-off-by: Guanhua Gao <guanhua.gao>
2017-12-12staging: fsl-dpaa2/eth: Refactor fq taildrop setupBogdan Purcareata
With the introduction of PFC support, there are multiple ways taildrop is configured, based on the DPNI pause frame configuration: - no pause frames - per-queue taildrop thresholds. - pause frames - no taildrop thresholds (pause frames sent based on buffer depletion). - PFC pause frames - per-group (traffic class) taildrop thresholds for non-PFC enabled priorities (pause frames sent based on Rx congestion notifications). Refactor the fq taildrop setup area. Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
2017-12-12staging: fsl-dpaa2/eth: Add ingress classificationBogdan Purcareata
Configure static ingress classification based on VLAN PCP, required by PFC. Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
2017-12-12staging: fsl-dpaa2/eth: Add DCB supportBogdan Purcareata
Add initial DCB ops in the DPAA2 Ethernet driver. Currently they are dummy calls. Tested integration with userspace lldpad: - lldpad daemon running - bring interface up - lldptool -L -i niX adminStatus=rxtx - lldptool -T -i niX -V PFC -c enabled={prio comma separated list} - lldptool -t -i niX -V PFC -c enabled Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
2017-12-12staging: fsl-dpaa2/eth: Handle multiple traffic classesBogdan Purcareata
The driver only handles frame workqueues associated with traffic class 0. Add support for multiple traffic classes for the same flowid, based on the tc field in the fq struct, and the num_tcs parameter in the dpni atttributes. Create a separate fq for each tc x flowid. Display the information in debugfs. Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
2017-09-25staging: fsl-dpaa2/eth: move generic FD defines to DPIOHoria Geantă
Previous commits: 6e2387e8f19e ("staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driver") 39163c0ce0f4 ("staging: fsl-dpaa2/eth: Errors checking update") have added bits that are not specific to the WRIOP accelerator. Move these where they belong (in DPIO) such that other accelerators can make use of them. While here, fix the values of FD_CTRL_FSE and FD_CTRL_FAERR, which were shifted off by one bit. Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
2017-09-25staging: fsl-dpaa2/eth: Update tx_shaping max burst sizeBogdan Purcareata
Starting from MC 10.2.x, max burst size value has decreased from 0xFFFF to 0xF7FF. Update the check in the driver. Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
2017-09-25staging: fsl-dpaa2/eth: Fix kfree bugIoana Radulescu
Fix an issue where we weren't freeing the allocated pointer, but rather the 16-byte aligned address based on it. Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
2017-09-25staging: fsl-dpaa2/eth: Use DMA APIs for address translationsIoana Radulescu
Use the correct APIs for translating a DMA-mapped IOVA address into a virtual one. Signed-off-by: Nipun Gupta <nipun.gupta@nxp.com> Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
2017-09-25staging: fsl-dpaa2/eth: Add debugfs statistics supportBogdan Purcareata
Add DPAA2 Ethernet debugfs statistics, displaying aggregated counters pertaining to CPU, frame queue and channel. It's a squashed commit containing contributions by the following authors: Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@nxp.com> Signed-off-by: Cristian Sovaiala <cristian.sovaiala@nxp.com> Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>
2017-09-25staging: fsl-dpaa2/eth: Add Freescale DPAA2 Ethernet driverBogdan Purcareata
Introduce the DPAA2 Ethernet driver, which manages Datapath Network Interface (DPNI) objects discovered on the MC bus. In addition to DPNIs, the Ethernet driver uses several other MC objects to build a network interface abstraction: buffer pools (DPBPs), I/O Portals (DPIOs) and concentrators (DPCONs). The starting point is the SDK 2.0 GA 1703 driver, plus the following changes: - removed busy poll code (integrated into netstack) - minor signature change for dpaa2_eth_get_stats - debugfs support removed (contained into different patch) - Tx queues registered to XPS - max MTU handling changed according to netdevice update - dropped dpaa2_sg_{le_to_cpu/cpu_to_le} - no longer needed (BIG_ENDIAN support not tested yet) This is a squashed commit containing the contributions of the following authors: Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com> Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@nxp.com> Signed-off-by: Cristian Sovaiala <cristian.sovaiala@nxp.com> Signed-off-by: Alexandru Marginean <alexandru.marginean@nxp.com> Signed-off-by: Roy Pledge <roy.pledge@nxp.com> Signed-off-by: Haiying Wang <haiying.wang@nxp.com> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com> Signed-off-by: J. German Rivera <German.Rivera@freescale.com> Signed-off-by: Itai Katz <itai.katz@freescale.com> Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com> Signed-off-by: Bogdan Purcareata <bogdan.purcareata@nxp.com>