UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor vharris007
Visitor
6,923 Views
Registered: ‎02-24-2015

Rx checksum

We seeing an odd issue with both the PS eMAC the soft-core AXI Ethernet MAC. In both cases the rx-checksumming is off. We've try to enable it with ethtool but feature isn't changeable. Is there any way to enable Rx checksum?

 

Van

 

[root@alarm ~]# uname -a
Linux alarm 3.17.0-xilinx-00114-gda2d296 #3 SMP PREEMPT Mon Jan 26 10:53:10 PST 2015 armv7l GNU/Linux


==============eth0 internal PS MAC ======================

[root@alarm ~]# ifconfig eth0
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.160.1.10  netmask 255.255.255.0  broadcast 10.160.1.255
        ether 00:0a:35:00:01:22  txqueuelen 1000  (Ethernet)
        RX packets 340  bytes 35630 (34.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 9  bytes 1986 (1.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 54  base 0xb000

[root@alarm ~]# ethtool -k eth0
Features for eth0:
rx-checksumming: off [fixed]
tx-checksumming: on
        tx-checksum-ipv4: on [fixed]
        tx-checksum-ip-generic: off [fixed]
        tx-checksum-ipv6: off [fixed]
        tx-checksum-fcoe-crc: off [fixed]
        tx-checksum-sctp: off [fixed]
scatter-gather: on
        tx-scatter-gather: on [fixed]
        tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: off
        tx-tcp-segmentation: off [fixed]
        tx-tcp-ecn-segmentation: off [fixed]
        tx-tcp6-segmentation: off [fixed]
udp-fragmentation-offload: off [fixed]
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: off [fixed]
tx-vlan-offload: off [fixed]
ntuple-filters: off [fixed]
receive-hashing: off [fixed]
highdma: off [fixed]
rx-vlan-filter: off [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-ipip-segmentation: off [fixed]
tx-sit-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-mpls-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
busy-poll: off [fixed]

[root@alarm ~]# ethtool -K eth0 rx on
Cannot change rx-checksumming
Could not change any device features


========eth2 AXI Ethernet soft-coare MAC ===============================

[root@alarm ~]# ifconfig eth2
eth2: flags=67<UP,BROADCAST,RUNNING>  mtu 1500
        inet 10.160.2.10  netmask 255.255.255.0  broadcast 10.160.2.255
        ether 00:0a:35:00:00:01  txqueuelen 1000  (Ethernet)
        RX packets 42  bytes 4653 (4.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5  bytes 378 (378.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@alarm ~]# ethtool -k eth2
Features for eth2:
rx-checksumming: off [fixed]
tx-checksumming: on
        tx-checksum-ipv4: on [fixed]
        tx-checksum-ip-generic: off [fixed]
        tx-checksum-ipv6: off [fixed]
        tx-checksum-fcoe-crc: off [fixed]
        tx-checksum-sctp: off [fixed]
scatter-gather: on
        tx-scatter-gather: on [fixed]
        tx-scatter-gather-fraglist: off [fixed]
tcp-segmentation-offload: off
        tx-tcp-segmentation: off [fixed]
        tx-tcp-ecn-segmentation: off [fixed]
        tx-tcp6-segmentation: off [fixed]
udp-fragmentation-offload: off [fixed]
generic-segmentation-offload: on
generic-receive-offload: on
large-receive-offload: off [fixed]
rx-vlan-offload: off [fixed]
tx-vlan-offload: off [fixed]
ntuple-filters: off [fixed]
receive-hashing: off [fixed]
highdma: off [fixed]
rx-vlan-filter: off [fixed]
vlan-challenged: off [fixed]
tx-lockless: off [fixed]
netns-local: off [fixed]
tx-gso-robust: off [fixed]
tx-fcoe-segmentation: off [fixed]
tx-gre-segmentation: off [fixed]
tx-ipip-segmentation: off [fixed]
tx-sit-segmentation: off [fixed]
tx-udp_tnl-segmentation: off [fixed]
tx-mpls-segmentation: off [fixed]
fcoe-mtu: off [fixed]
tx-nocache-copy: off
loopback: off [fixed]
rx-fcs: off [fixed]
rx-all: off [fixed]
tx-vlan-stag-hw-insert: off [fixed]
rx-vlan-stag-hw-parse: off [fixed]
rx-vlan-stag-filter: off [fixed]
l2-fwd-offload: off [fixed]
busy-poll: off [fixed]
[root@alarm ~]#

[root@alarm ~]# ethtool -K eth2 rx on
Cannot change rx-checksumming
Could not change any device features

 

0 Kudos
2 Replies
Contributor
Contributor
6,902 Views
Registered: ‎05-27-2008

Re: Rx checksum

The customer has confirmed that "rx_chksum_offld_en" bit is being set in the net cfg reg but for some reason ethtool is not reflecting this.  Getting RX checksum offload working is a critical  performance issue for us. 

 

Anything you can do to help debug this quickly would be appreciated.

 

Thanks,

John

Avnet FAE

jd
0 Kudos
Highlighted
Visitor masterfx
Visitor
6,406 Views
Registered: ‎07-08-2015

Re: Rx checksum

To get the rx-checksumming reflected via ethtool, just set the flag in the features struct


--- drivers/net/ethernet/xilinx/xilinx_emacps.org.c     2015-07-07 14:46:52.851649894 +0200
+++ drivers/net/ethernet/xilinx/xilinx_emacps.c     2015-07-07 14:49:04.000000000 +0200
@@ -2870,7 +2870,7 @@
        ndev->watchdog_timeo = TX_TIMEOUT;
        ndev->ethtool_ops = &xemacps_ethtool_ops;
        ndev->base_addr = r_mem->start;
-       ndev->features = NETIF_F_IP_CSUM | NETIF_F_SG;
+       ndev->features = NETIF_F_IP_CSUM | NETIF_F_SG | NETIF_F_RXCSUM;
        netif_napi_add(ndev, &lp->napi, xemacps_rx_poll, XEMACPS_NAPI_WEIGHT);

        lp->ip_summed = CHECKSUM_UNNECESSARY;

 

But I didn't see any difference in performance via netperf. Maybe its because the CPU is always at 50% CPU load (one Core = 100%)

0 Kudos