handling when the rings will be
repopulated but not freed.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 68 ++--
1 file changed, 47 insertions(+), 21 deletions(-)
diff --git a/drivers/net/et
The interrupt isn't shared, so this will keep it masked
until we have the HW in a known sane state.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff
as well.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 85 +++-
1 file changed, 72 insertions(+), 13 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/drivers/net/ethernet/f
It's not used in any meaningful way
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 7 ---
1 file changed, 7 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/drivers/net/ethernet/faraday/ftgmac100.c
Reorder the fields in struct ftgmac in slightly more logical
groups. Will make more sense as I add/remove some.
No code change.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 19 ---
1 file changed, 12 inse
There's a placeholder already for the irq, use it
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/d
. Move the ring pointers initialization there
too in order to reflect the HW change.
Also reduce the timeout for the MAC reset as it shouldn't
take more than 300 clock cycles according to the doc.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/f
ts
is less efficient than letting NAPI run a while longer while
the queue drains.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 137 +--
drivers/net/ethernet/faraday/ftgmac100.h | 14
2 files change
On Sun, 2017-04-02 at 13:35 +1000, Benjamin Herrenschmidt wrote:
> + /* Block PHY polling */
> + if (netdev->phydev)
> + mutex_lock(>phydev->lock);
> +
> + rtnl_lock();
Self-given brown paper bag, those two need to be taken the oth
Hi Dave !
What is your preference when a couple of patches in a series of about a
dozen get updated as a result of reviews ? Just send updates to those
few or resend the whole series ?
In the latter case I'll wait a bit longer for more comments.
Cheers,
Ben.
On Sun, 2017-04-02 at 20:42 +0200, Andrew Lunn wrote:
> Have you run lockdep tests on this? I think it is normal to take the
> rtnl lock first, then the phydev lock. Try some ethtool operations
> and see if you get a splat.
You are right. I actually realized that was wrong last night ;-) It
will
On Sun, 2017-04-02 at 20:42 +0200, Andrew Lunn wrote:
> Have you run lockdep tests on this?
Good idea. For some reason I run it regularly on powerpc but it never
occurred to me to try it on that 800Mhz ARM11 :-)
Cheers,
Ben.
To avoid confusion with the ndo callback and generally be
clearer about the purpose of that function
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drive
We set an arbitrary max at 1024 since we pre-allocate the actual
descriptor arrays and skb arrays to the full size to keep the
code a bit simpler and avoid allocation failures in the reset
task.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/f
The documentation describes NETIF_F_IP_CSUM as deprecated
so let's switch to NETIF_F_HW_CSUM and use the helper to
handle unhandled protocols.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
--
v2. - Properly fallback on unknown IP protocols (side effect
of
We test for aspeed chips to handle a couple of special cases,
but we do that by checking the machine type which isn't right.
Instead check the actual device compatible property. This also
updates the dtsi files for the aspeed SoC to match.
Signed-off-by: Benjamin Herrenschmidt &l
disable HW checksum generation and checking regardless of whether
NC-SI is used or not in case other variants out there need this.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
arch/arm/boot/dts/aspeed-g4.dtsi | 2 --
arch/arm/boot/dts/aspeed-g5.dtsi | 2
I haven't seen any improvement above that size on the machines
I've tested with.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/f
Clear stale interrupts on entry, configure FIFO sizes, set FIFO
thresholds, configure interrupt mitigation.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 36
1 file changed, 36 insertions(+)
So features can be turned on/off via ethtool
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/drivers/net/et
The helpers just take space but don't provide much value. Simple
one line comments are more explanatory.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 53
1 file changed, 20 insertions(
On Wed, 2017-04-12 at 08:06 +1000, Benjamin Herrenschmidt wrote:
> On Tue, 2017-04-11 at 11:27 -0400, David Miller wrote:
> > > I'll fix it in a next spin if Dave wants it that way but
> > > otherwise
> > > I'm keen to leave it as it is.
> >
> > Please f
Hi folks !
Does anybody knows of an existing kind of automated "test suite" for a
network/ethernet driver ?
IE. Something we could run both on the "tested" driver and a cross-over
"known good" peer (possibly the latter set to promisc & no offload for
proper analysis), that would out the driver
This is v2 of the fourth batch of updates to the ftgmac100 driver.
This is a bunch of misc cleanups and fixes, such as properly
disabling HW checksum generation on AST2400 where it's known
to be broken and some chip init updates.
This also adds the ability to turn HW checksum on/off and
To remove more confusion. This function is about obtaining the
initial MAC address at driver probe time.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/d
On Tue, 2017-04-11 at 20:03 -0400, David Miller wrote:
> > From: Benjamin Herrenschmidt <b...@kernel.crashing.org>
> Date: Wed, 12 Apr 2017 09:36:05 +1000
>
> > I should call the helper when I don't recognize the protocol type in
> > the IP header, not just w
On Tue, 2017-04-11 at 17:36 -0700, Florian Fainelli wrote:
>
> You could start with using LNST:
>
> https://github.com/jpirko/lnst
>
> and there is also Ostinato which is a great way to get access to
> something IXIA-like, but all configurable in software through python
> bindings. Andrew's
On Tue, 2017-04-11 at 11:27 -0400, David Miller wrote:
> > I'll fix it in a next spin if Dave wants it that way but otherwise
> > I'm keen to leave it as it is.
>
> Please fix this and respin.
>
> Meanwhile get the coding style rules changed if you disagree with
> them. A patch series review is
On Thu, 2017-04-06 at 12:46 -0700, Florian Fainelli wrote:
> > I thought a while ago we could add some dev flag to prevent the link
> > watch from doing that, but never got to look into it myself and
> > apparently neither did Gavin.
>
> It sounds like a similar situation to e.g: 802.1x, you want
Directly access the fields when needed. The accessors add clutter
not clarity and in some cases cause unnecessary read-modify-write
type access on the slow (uncached) descriptor memory.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgma
stripping is enabled or not.
This works around it by ignoring the "runt" error bit of the
frame has been vlan tagged and is at least 60 bytes.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 35 +++---
Read the descriptor field only once and check for IP header
checksum errors as well
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 63 +---
1 file changed, 25 insertions(+), 38 deletions(-)
diff
We don't handle fragmented RX packets, so the "looping"
helpers to locate the first segment of a packet or to
drop a packet aren't actually helping.
Take them out and simplify ftgmac100_rx_packet() further
as a result.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org&
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/drivers/net/ethernet/faraday/ftgmac100.c
index 86bda0a..594af30 100644
--- a/drive
.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 61 +---
1 file changed, 25 insertions(+), 36 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/drivers/net/ethernet/faraday/ftgma
.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 142 ---
1 file changed, 56 insertions(+), 86 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/drivers/net/ethernet/faraday/ftgma
a proper buffer can be allocated.
It will help later on when re-initializing the whole ring
at runtime on link changes since there is no clean failure
path there unlike open().
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.
and improvements to the RX path
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 37
1 file changed, 18 insertions(+), 19 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/drivers/net/et
This is the second batch of updates to the ftgmac100 driver.
This one tackles the RX path of the driver, simplifying
it greatly to match common practice while significantly
increasing the performance.
(The bulk of the performance gains of my series will be
provided by the TX path improvements,
Avoids a forward declaration
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 59 +++-
1 file changed, 28 insertions(+), 31 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/d
This is version 2 of the third batch of updates to
the ftgmac100 driver.
This one tackles the TX path of the driver. This provides the
bulk of the performance improvements by adding support for
fragmented sends along with a bunch of cleanups.
Version 2 fixes a patch splitting mistake and uses
Rather than just transmitting garbage past the end of the small
packet.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
--
v2. Use eth_skb_pad (wrapper around skb_put_padto)
---
drivers/net/ethernet/faraday/ftgmac100.c | 10 --
1 file changed, 8 insertions
We have a reset task to reset our chip, use it.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/drivers/net/et
This moves the packet freeing to a separate function
which is also used by ftgmac100_free_buffers() and will
be used more in the error path of fragmented sends.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.
Directly access the fields when needed. The accessors add clutter
not clarity and in some cases cause unnecessary read-modify-write
type access on the slow (uncached) descriptor memory.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
v2. - Adjust for changes in pr
s.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
v2. - Fix patch splitting mistake
---
drivers/net/ethernet/faraday/ftgmac100.c | 59 +---
1 file changed, 16 insertions(+), 43 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac
We'll use variants of this accessor without barriers when
building series of descriptors for fragmented sends
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff
Add NETIF_F_SG and create multiple TX ring entries for skb fragments.
On reclaim, the skb is only freed on the segment marked as "last".
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
--
v2. - Remove skb headlen size adjustments now that we use
nt reclaim. The aspeed chips aren't SMP
today but I prefer the code being right and future proof.
So rip that out and replace it with more "standard" queue handling,
currently with a threshold of 1 queue element, which will be
increased when we implement fragmented sends.
Signed-off-by: Be
Use a simple goto to a drop path at the tail of the function,
it will be used in a few more cases soon
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff
This will make subsequent rework of the tx path simpler
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 58 ++--
1 file changed, 25 insertions(+), 33 deletions(-)
diff --git a/drivers/net/et
Move it below ftgmac100_xmit() and the rest of the tx path
No code change.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
v2. - Fix patch splitting mistake
---
drivers/net/ethernet/faraday/ftgmac100.c | 58
1 file changed, 29 inse
Those are non-cachable stores, let's avoid those we don't need. Remove
the helper, it's not particularly helpful and since it uses "priv"
I can't move it to the header file.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/
On Tue, 2017-04-11 at 13:57 +0300, Sergei Shtylyov wrote:
> Need {} here as well since the 1st branch has it -- see
> Documentation/process/coding-style.rst (the end of the section 3).
Adding {} in that specific statements just makes things more
cluttered and less readable.
I can find a ton
This is fifth and last batch of updates to the ftgmac100 driver.
This contains a few additional "features" such as:
- Support for ethtool n-way reset
- Multicast filtering & promisc support
- Vlan offload
- netpoll
And a couple of misc bits. This also adds the device-tree binding
Just call the interrupt handler with interrupts locally disabled
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/d
This uses the standard phy-mode property
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 42 +---
1 file changed, 39 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac10
On Wed, 2017-04-12 at 10:19 -0400, David Miller wrote:
>
> > v2 Fixes patch 1/10 (NETIF_F_HW_CSUM conversion)
> >
> > The next (and last) batch will add a few more "features" such
> > as netpoll, multicast/promist, vlan offload...
> >
>
> Series applied, thanks Benjamin.
>
> I really like how
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
.../devicetree/bindings/net/ftgmac100.txt | 36 ++
1 file changed, 36 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/ftgmac100.txt
diff --git a/Documentation/devi
Hopefully my understanding of how the hardware works is correct,
as the documentation isn't completely clear. So far I have seen
no obvious issue. Pause seem to also work with NC-SI.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgma
This adds the ndo_set_rx_mode() callback to configure the
multicast filters, promisc and allmulti options.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 52
1 file changed, 52 insertions(+)
The chip supports HW vlan tag insertion and extraction. Add support
for it.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 46 +++-
1 file changed, 45 insertions(+), 1 deletion(-)
diff --git a/d
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/drivers/net/ethernet/faraday/ftgmac100.c
index c1afda8..d04ad31 100644
--- a/drive
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/drivers/net/ethernet/faraday/ftgmac100.c
index 796b37e..b
On Wed, 2017-04-12 at 17:00 -0700, Florian Fainelli wrote:
> > -static int ftgmac100_nway_reset(struct net_device *ndev)
> > +static int ftgmac100_nway_reset(struct net_device *netdev)
> > {
> > - if (!ndev->phydev)
> > + if (!netdev->phydev)
> > return -ENXIO;
> > -
This adds the ndo_set_rx_mode() callback to configure the
multicast filters, promisc and allmulti options.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 52
1 file changed, 52 insertions(+)
Hopefully my understanding of how the hardware works is correct,
as the documentation isn't completely clear. So far I have seen
no obvious issue. Pause seem to also work with NC-SI.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgma
Just call the interrupt handler with interrupts locally disabled
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/d
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/drivers/net/ethernet/faraday/ftgmac100.c
index 7c607eb..71763e4 100644
--- a/drive
The chip supports HW vlan tag insertion and extraction. Add support
for it.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 46 +++-
1 file changed, 45 insertions(+), 1 deletion(-)
diff --git a/d
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
.../devicetree/bindings/net/ftgmac100.txt | 36 ++
1 file changed, 36 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/ftgmac100.txt
diff --git a/Documentation/devi
This uses the standard phy-mode property
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 42 +---
1 file changed, 39 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac10
This is the second spin of the fifth and last batch of
updates to the ftgmac100 driver.
This contains a few additional "features" such as:
- Support for ethtool n-way reset
- Multicast filtering & promisc support
- Vlan offload
- netpoll
And a couple of misc bits. This also adds the
A non-wired up implementation accidentally made its way in
a previous patch (Make ring sizes configurable via ethtool).
This removes it and wires up the generic phy_ethtool_nway_reset
instead.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
--
v2. - Use phy_ethtool_nway
will
order subsequent accesses.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/drivers/net/ethernet/faraday/ftgmac100.c
index
On Thu, 2017-04-13 at 15:42 +0200, Andrew Lunn wrote:
> > +- phy-mode: See ethernet.txt file in the same directory. If the
> > property is
> > + absent, "rgmii" is assumed. Supported values are "rgmii" and
> > "rmii"
>
> You might want to say rgmii*, or similar, it indicate the delayed
>
On Sun, 2017-04-02 at 20:28 +0200, Andrew Lunn wrote:
> > + if (new_speed) {
> > + netdev_info(netdev, "Link up at %d Mbit/s %s
> > duplex\n",
> > + new_speed,
> > + phydev->duplex == DUPLEX_FULL ? "full"
> > : "half");
> > + } else if
On Sun, 2017-04-02 at 13:35 +1000, Benjamin Herrenschmidt wrote:
> + } else if (priv->cur_speed) {
> + /* No link, just return. Leave the HW alone so it can
> + * continue draining the tx ring.
> + */
> + netdev_
On Sun, 2017-04-02 at 20:28 +0200, Andrew Lunn wrote:
> Please consider using phy_print_status().
So in a subsequent (not yet posted) patch, I add Pause support. I
noticed that phy_print_status() doesn't distinguish between full
and partial (asym) pause support.
Is that intentional ?
On Fri, 2017-04-07 at 13:09 +0300, Sergei Shtylyov wrote:
> Hello!
>
> On 4/7/2017 6:30 AM, Benjamin Herrenschmidt wrote:
>
> > Move it below ftgmac100_xmit() and the rest of the tx path
> >
> > No code change.
> >
> > Signed-off-by: Benjam
On Fri, 2017-04-07 at 06:26 -0700, Florian Fainelli wrote:
>
> On 04/06/2017 08:31 PM, Benjamin Herrenschmidt wrote:
> > Add NETIF_F_SG and create multiple TX ring entries for skb fragments.
> >
> > On reclaim, the skb is only freed on the segment marked as "l
On Fri, 2017-04-07 at 05:49 -0700, David Miller wrote:
> > /* Tx ring */
> > + struct sk_buff *tx_skbs[TX_QUEUE_ENTRIES];
> > unsigned int tx_clean_pointer;
> > unsigned int tx_pointer;
> > unsigned int tx_pending;
>
> Add this only in patch #6 or wherever it is
On Fri, 2017-04-07 at 06:05 -0700, Florian Fainelli wrote:
> You may want to use skb_put_padto() which also takes care of bumping
> skb->len accordingly, in case that makes a difference for the
> ftgmac100 hardware.
Subsequent patch adds fragments, so it needs to bump headlen. I'll have
a look
Reorder the fields in struct ftgmac in slightly more logical
groups. Will make more sense as I add/remove some.
No code change.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 19 ---
1 file changed, 12 inse
The interrupt isn't shared, so this will keep it masked
until we have the HW in a known sane state.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 19 ++-
1 file changed, 10 insertions(+), 9 deletions(-)
diff
I noticed in both Documentation/networking/checksum-offload.txt
and include/linux/skbuff.h reference to helpers
skb_csum_off_chk*
Now, I can't find anything like that with grep ... :-)
Am I missing something ?
Cheers,
Ben.
Directly access the fields when needed. The accessors add clutter
not clarity and in some cases cause unnecessary read-modify-write
type access on the slow (uncached) descriptor memory.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgma
This is the third batch of updates to the ftgmac100 driver.
This one tackles the TX path of the driver. This provides the
bulk of the performance improvements by adding support for
fragmented sends along with a bunch of cleanups.
Subsequent batches will add various features (ethtool functions,
Those are non-cachable stores, let's avoid those we don't need. Remove
the helper, it's not particularly helpful and since it uses "priv"
I can't move it to the header file.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/
This will make subsequent rework of the tx path simpler
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 58 ++--
1 file changed, 25 insertions(+), 33 deletions(-)
diff --git a/drivers/net/et
Use a simple goto to a drop path at the tail of the function,
it will be used in a few more cases soon
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff
We have a reset task to reset our chip, use it.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/drivers/net/et
This moves the packet freeing to a separate function
which is also used by ftgmac100_free_buffers() and will
be used more in the error path of fragmented sends.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.
Move it below ftgmac100_xmit() and the rest of the tx path
No code change.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 59
1 file changed, 30 insertions(+), 29 deletions(-)
diff --git a/d
Rather than just transmitting garbage past the end of the small
packet.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/drive
s.
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 58 +---
1 file changed, 15 insertions(+), 43 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c
b/drivers/net/ethernet/faraday/f
nt reclaim. The aspeed chips aren't SMP
today but I prefer the code being right and future proof.
So rip that out and replace it with more "standard" queue handling,
currently with a threshold of 1 queue element, which will be
increased when we implement fragmented sends.
Signed-off-by: Be
Add NETIF_F_SG and create multiple TX ring entries for skb fragments.
On reclaim, the skb is only freed on the segment marked as "last".
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
# Conflicts:
# drivers/net/ethernet/faraday/ftgmac100.c
---
driv
We'll use variants of this accessor without barriers when
building series of descriptors for fragmented sends
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff
This uses the standard phy-mode property
Signed-off-by: Benjamin Herrenschmidt <b...@kernel.crashing.org>
---
drivers/net/ethernet/faraday/ftgmac100.c | 42 +---
1 file changed, 39 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac10
301 - 400 of 443 matches
Mail list logo