korina: adjust headroom for new skb's also
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 korina: set dev field of allocated socketbufs
I'm not sure if this is necessary, but the original driver did it and apparently also many other drivers do it, so it should not be completely wrong to do it.
--- drivers/net/korina.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/net/korina.c +2 -0
@@ -419,6 +419,7 @@ static int korina_rx(struct net_device *dev, int limit)/* 16 bit align */ skb_reserve (skb_new,2 ); + skb_new->dev = dev; lp->rx_skb[lp->rx_next_done] = skb_new; }
@@ -763,6 +764,7 @@ static void korina_alloc_ring(struct net_device *dev)if (!skb)break ;skb_reserve (skb,2 ); + skb->dev = dev; lp->rx_skb[i] = skb; lp->rd_ring[i].control =DMA_DESC_IOD |DMA_COUNT (KORINA_RBSIZE );
Signature · 1 line
1.5.6.4
Re: [PATCH] korina: set dev field of allocated socketbufs
Le Thursday 15 January 2009 23:29:58 Phil Sutter, vous avez écrit :
Quoted 5 lines
I'm not sure if this is necessary, but the original driver did it and apparently also many other drivers do it, so it should not be completely wrong to do it.
Signed-off-by Phil Sutter <[email protected]>
Signature · 4 lines
Best regards, Florian Fainelli Email : [email protected] http://openwrt.org -------------------------------
David Miller
maintainerRe: [PATCH] korina: set dev field of allocated socketbufs
From: Florian Fainelli <[email protected]>
Date: Mon, 19 Jan 2009 22:08:00 +0100
Quoted 8 lines
Le Thursday 15 January 2009 23:29:58 Phil Sutter, vous avez écrit :
Quoted 5 lines
I'm not sure if this is necessary, but the original driver did it and apparently also many other drivers do it, so it should not be completely wrong to do it.
Signed-off-by Phil Sutter <[email protected]>Acked-by Florian Fainelli <[email protected]>
The eth_type_trans() call does the 'skb->dev = dev;' assignment for you.
Not applied.
PATCH 1/1 korina: drop leftover assignment
In reply to a message not in the archiveAs the assigned value is being overwritten shortly after, it can be dropped and so the whole variable definition moved to the start of the function.
--- drivers/net/korina.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/net/korina.c +1 -2
@@ -743,6 +743,7 @@ static struct ethtool_ops netdev_ethtool_ops = {static void korina_alloc_ring (struct net_device *dev) {struct korina_private *lp =netdev_priv (dev); +struct sk_buff *skb;int i;/* Initialize the transmit descriptors */
@@ -758,8 +759,6 @@ static void korina_alloc_ring(struct net_device *dev)/* Initialize the receive descriptors */ for (i =0 ; i <KORINA_NUM_RDS ; i++) { -struct sk_buff *skb = lp->rx_skb[i]; - skb =dev_alloc_skb (KORINA_RBSIZE +2 );if (!skb)break ;
Signature · 1 line
1.5.6.4
Re: [PATCH] korina: drop leftover assignment
Le Thursday 15 January 2009 23:29:57 Phil Sutter, vous avez écrit :
Quoted 5 lines
As the assigned value is being overwritten shortly after, it can be dropped and so the whole variable definition moved to the start of the function.
Signed-off-by Phil Sutter <[email protected]>
Signature · 4 lines
Best regards, Florian Fainelli Email : [email protected] http://openwrt.org -------------------------------
Re: [PATCH] korina: drop leftover assignment
From: Florian Fainelli <[email protected]>
Date: Mon, 19 Jan 2009 22:07:01 +0100
Quoted 8 lines
Le Thursday 15 January 2009 23:29:57 Phil Sutter, vous avez écrit :
Quoted 5 lines
As the assigned value is being overwritten shortly after, it can be dropped and so the whole variable definition moved to the start of the function.
Signed-off-by Phil Sutter <[email protected]>Acked-by Florian Fainelli <[email protected]>
Applied.
PATCH 1/1 korina: adjust headroom for new skb's also
In reply to a message not in the archiveThis is copy and paste from the original driver. As skb_reserve() is also called within korina_alloc_ring() when initially allocating the receive descriptors, the same should be done when allocating new space after passing an skb to upper layers.
--- drivers/net/korina.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/net/korina.c +3 -0
@@ -416,6 +416,9 @@ static int korina_rx(struct net_device *dev, int limit)if (devcs Ð_RX_MP ) dev->stats.multicast++; +/* 16 bit align */ +skb_reserve (skb_new,2 ); + lp->rx_skb[lp->rx_next_done] = skb_new; }
Signature · 1 line
1.5.6.4
Le Thursday 15 January 2009 23:29:56 Phil Sutter, vous avez écrit :
Quoted 6 lines
This is copy and paste from the original driver. As
skb_reserve()is also called withinkorina_alloc_ring()when initially allocating the receive descriptors, the same should be done when allocating new space after passing an skb to upper layers.Signed-off-by Phil Sutter <[email protected]>
Signature · 4 lines
Best regards, Florian Fainelli Email : [email protected] http://openwrt.org -------------------------------
From: Florian Fainelli <[email protected]>
Date: Mon, 19 Jan 2009 22:07:45 +0100
Quoted 9 lines
Le Thursday 15 January 2009 23:29:56 Phil Sutter, vous avez écrit :
Quoted 6 lines
This is copy and paste from the original driver. As
skb_reserve()is also called withinkorina_alloc_ring()when initially allocating the receive descriptors, the same should be done when allocating new space after passing an skb to upper layers.Signed-off-by Phil Sutter <[email protected]>Acked-by Florian Fainelli <[email protected]>
Applied.