Thread (26 messages) 26 messages, 3 authors, 2012-10-10

Re: [PATCH 11/11] net: xilinx: Show csum in bootlog

flat view

From: Ben Hutchings <hidden>
Date: 2012-10-10 16:14:14
Also in: lkml

On Wed, 2012-10-10 at 18:06 +0200, Michal Simek wrote:
2012/10/9 Ben Hutchings [off-list ref]:
quoted
On Tue, 2012-10-09 at 11:08 +0200, Michal Simek wrote:
quoted
On 10/05/2012 03:51 PM, Ben Hutchings wrote:
quoted
On Fri, 2012-10-05 at 11:35 +0200, Michal Simek wrote:
quoted
On 10/04/2012 09:15 PM, Ben Hutchings wrote:
quoted
On Thu, 2012-10-04 at 20:14 +0200, Michal Simek wrote:
quoted
Just show current setting in bootlog.
[...]
quoted
--- a/drivers/net/ethernet/xilinx/ll_temac_main.c
+++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
@@ -1052,12 +1052,14 @@ static int __devinit temac_of_probe(struct platform_device *op)
         /* Setup checksum offload, but default to off if not specified */
         lp->temac_features = 0;
         p = (__be32 *)of_get_property(op->dev.of_node, "xlnx,txcsum", NULL);
+        dev_info(&op->dev, "TX_CSUM %d\n", be32_to_cpup(p));
         if (p && be32_to_cpu(*p)) {
                 lp->temac_features |= TEMAC_FEATURE_TX_CSUM;
                 /* Can checksum TCP/UDP over IPv4. */
                 ndev->features |= NETIF_F_IP_CSUM;
         }
         p = (__be32 *)of_get_property(op->dev.of_node, "xlnx,rxcsum", NULL);
+        dev_info(&op->dev, "RX_CSUM %d\n", be32_to_cpup(p));
[...]

Is there any particular reason you think this needs to be logged by
default, rather than letting users run ethtool -k?  I suggest using
dev_dbg() instead.
Ok. I have looked at it and there are missing some bits in ndev->features.

Can you please check that my setting is correct?

It is SG DMA ip/driver.
ndev->features = NETIF_F_FRAGLIST | NETIF_F_SG
NETIF_F_SG only; NETIF_F_FRAGLIST means you can handle skbs chained
through the frag_list pointer.
The driver is able to handle skb fragments too. temac_start_xmit
"git grep -w -E 'frag_list|skb_walk_frags|skb_to_sgvec' drivers/net/ethernet/xilinx"
returns nothing in net-next.
What about this? Maybe it is different fragmentation.
drivers/net/ethernet/xilinx/ll_temac_main.c
 688         num_frag = skb_shinfo(skb)->nr_frags;
 689         frag = &skb_shinfo(skb)->frags[0];
[...]

Yes, the fact that you handle the frags array is indicated by feature
flag NETIF_F_SG.

Ben.

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help