Age | Commit message (Collapse) | Author |
|
When the skb recycling feature is disabled via module param
(gfar_skb_recycling_en), rec->local is being accessed while
not initialized.
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Change-Id: I0f9d355302e694860cc3d46c296409126887b4a9
Reviewed-on: http://git.am.freescale.net:8181/3369
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
|
|
When this option is enabled the driver will try to allocate the
buffer descriptors (BDs) to the L2 SRAM memory, using the
powerpc/85xx cache-sram support API for the P1/P2 QorIQ platforms.
For this to work, the size and the address of the SRAM region
must be provided as kernel boot params.
Should the attempt to allocate in L2 SRAM fail, the driver falls
back to normal allocation of BDs as before (i.e. to DDR).
The gfar_l2sram_en driver module param is provided to allow to
disable the allocation to L2 SRAM at driver level (enabled by
default).
Sysfs stubs allow to enable/diable allocation of BDs to L2 SRAM
for individual gianfar devices, as the L2 SRAM is an expensive
resource. By default, each device has this feature enabled.
This feature also disables the BD L2 stasing feature by default.
Stasing however may still be configured per device via sysfs.
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Change-Id: Ie967cd24c2c6d6654b33d175be0d9e3c785c324a
Reviewed-on: http://git.am.freescale.net:8181/2596
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Gupta Rajan-B15745 <rajan.gupta@freescale.com>
Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
|
|
Improve skb recycling efficiency by adding per CPU recycle
queues. This allows lockless access to the local recycle
queues and improves cache locality for the recycled buffers.
On the other hand it may increase memory usage as each device
will have one local recycle queue for each CPU in addition
to the "shared" recycle queue. The optimization targets
packet forwarding scenarios where each flow is assigned to
a single CPU.
If the local percpu recycle queue cannot service the dequeue or
enqueue requests (i.e. queue either empty or resp. full), then
the request falls back to the shared recycle queue. Local per
CPU queue accesses are lockless.
The sysfs recycle stub has been augmented to print the percpu
statistics as well.
The gfar_init_recycle() has been updated to alloc the percpu
local queue structures and moved after device registration,
to be able to log warning messages should the allocation fail.
MAX_RECYCLE is set to the default Tx ring size (which is now
equal to the default Rx ring size).
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Change-Id: Ibae54d6dcd83581ca7a5f2d409b3b2b412e52f0d
Reviewed-on: http://git.am.freescale.net:8181/2550
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
|
|
This patch integrates the IEEE 1588 specification v2 ioctls with
the gianfar driver. The user space application should be IXXAT
IEEE1588 stack v1.04 or above.
The IEEE 1588 driver can also be disabled/enabled via sysfs.
To enable 1588:
- echo 1 > /sys/*/ethN/ptp_1588
To disable 1588
- echo 0 > /sys/*/ethN/ptp_1588
Signed-off-by: Sandeep Gopalpet <sandeep.kumar@freescale.com>
Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@freescale.com>
Signed-off-by: Tang Yuantian <Yuantian.Tang@freescale.com>
Signed-off-by: Xie Xiaobo <X.Xie@freescale.com>
Change-Id: I3a1190eb6bce06417e0365aba06d73d3a9af5634
Reviewed-on: http://git.am.freescale.net:8181/866
Reviewed-by: Tang Yuantian-B29983 <yuantian.tang@freescale.com>
Reviewed-by: Manoil Claudiu-B08782 <claudiu.manoil@freescale.com>
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
|
|
The gfar_skb_recycling_en driver option (boot time or module load time)
when disabled (set to 'N') effectively prevents recycling of skbs.
The option is enabled by default.
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Change-Id: Ib54fbd4bcc0102e10e8fa4e2a658272a6b8192ff
Reviewed-on: http://git.am.freescale.net:8181/871
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
|
|
Introduce per device skb recycle queues, in order to reuse 'hot'
skbs on the device's Rx path without allocating new ones.
The skb recycling infrastructure is taken from the mainline
kernel 3.0 (see skb_is_recycleable() and skb_recycle()).
The recycle queue accesses (enqueue/ dequeue skbs) are protected
by the skb queue lock, b/w the Rx and Tx paths.
There are two work modes when recycling skbs:
1) the device recycles its own skbs: the skbs 'freed' on the device's
Tx path are put back into the same device's recycle queue;
2) the transmitting device recycles the skbs to the targeted receiving
device's recycle queue, to benefit ipv4 forwarding scenarios.
The 'recycle_target' read/write sysfs entry is provided to select b/w
the two work modes for a gfar (gianfar) interface.
e.g. for the gfar interface 'eth1', by default 'recycle_target' is set
to 'eth1', meaning the the device operates in mode 1. When forwarding
packets b/w the two gfar devices 'eth2'->'eth1', the 'recycle_target'
entry for 'eth1' should be set to 'eth2', to successfully enable
operation mode 2.
The readonly 'recyle' sysfs entry provides skb recycling statistics
for a given gfar device.
Taken from the mainline kernel 3.0, where it operated only in mode 1,
and adapted to work in packet forwarding scenarios too (mode 2).
Signed-off-by: Claudiu Manoil <claudiu.manoil@freescale.com>
Change-Id: Id5f705759e1519cc42d5fbf94fd7542eb4661ee4
Reviewed-on: http://git.am.freescale.net:8181/870
Reviewed-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
Tested-by: Fleming Andrew-AFLEMING <AFLEMING@freescale.com>
|
|
The reorganization of the driver layout in drivers/net
left behind some stale paths in comments and in Kconfig
help text. Bring them up to date. No actual change to
any code takes place here.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
CC: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Move the Freescale drivers into drivers/net/ethernet/freescale/ and
make the necessary Kconfig and Makefile changes.
CC: Sandeep Gopalpet <sandeep.kumar@freescale.com>
CC: Andy Fleming <afleming@freescale.com>
CC: Shlomi Gridish <gridish@freescale.com>
CC: Li Yang <leoli@freescale.com>
CC: Pantelis Antoniou <pantelis.antoniou@gmail.com>
CC: Vitaly Bordug <vbordug@ru.mvista.com>
CC: Dan Malek <dmalek@jlc.net>
CC: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
|