lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 13 Mar 2008 09:44:20 -0700
From:	"Vernon Mauery" <vmauery@...il.com>
To:	"Dhananjay Phadke" <dhananjay@...xen.com>
Cc:	netdev@...r.kernel.org, "Jeff Garzik" <jeff@...zik.org>
Subject: Re: [PATCH 4/4] netxen: fix rx dropped stats

On 3/12/08, Dhananjay Phadke <dhananjay@...xen.com> wrote:
>
>  Don't count rx dropped packets based on return value of netif_receive_skb(),
>  which is misleading.
>
>  Signed-off-by: Dhananjay Phadke <dhananjay@...xen.com>

I have tested this patch on my netxen hardware and found that it fixes
a TX timeout hang that I was seeing previously.

Tested-by: Vernon Mauery <vernux@...ibm.com>

--Vernon

>  ---
>   drivers/net/netxen/netxen_nic.h         |    7 +-----
>   drivers/net/netxen/netxen_nic_ethtool.c |    6 -----
>   drivers/net/netxen/netxen_nic_init.c    |   33 +------------------------------
>   drivers/net/netxen/netxen_nic_isr.c     |    2 +-
>   4 files changed, 3 insertions(+), 45 deletions(-)
>
>  diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h
>  index 070421b..7f20a03 100644
>  --- a/drivers/net/netxen/netxen_nic.h
>  +++ b/drivers/net/netxen/netxen_nic.h
>  @@ -818,12 +818,7 @@ struct netxen_adapter_stats {
>         u64  badskblen;
>         u64  nocmddescriptor;
>         u64  polled;
>  -       u64  uphappy;
>  -       u64  updropped;
>  -       u64  uplcong;
>  -       u64  uphcong;
>  -       u64  upmcong;
>  -       u64  updunno;
>  +       u64  rxdropped;
>         u64  txdropped;
>         u64  csummed;
>         u64  no_rcv;
>  diff --git a/drivers/net/netxen/netxen_nic_ethtool.c b/drivers/net/netxen/netxen_nic_ethtool.c
>  index d324ea3..6e98d83 100644
>  --- a/drivers/net/netxen/netxen_nic_ethtool.c
>  +++ b/drivers/net/netxen/netxen_nic_ethtool.c
>  @@ -64,12 +64,6 @@ static const struct netxen_nic_stats netxen_nic_gstrings_stats[] = {
>         {"bad_skb_len", NETXEN_NIC_STAT(stats.badskblen)},
>         {"no_cmd_desc", NETXEN_NIC_STAT(stats.nocmddescriptor)},
>         {"polled", NETXEN_NIC_STAT(stats.polled)},
>  -       {"uphappy", NETXEN_NIC_STAT(stats.uphappy)},
>  -       {"updropped", NETXEN_NIC_STAT(stats.updropped)},
>  -       {"uplcong", NETXEN_NIC_STAT(stats.uplcong)},
>  -       {"uphcong", NETXEN_NIC_STAT(stats.uphcong)},
>  -       {"upmcong", NETXEN_NIC_STAT(stats.upmcong)},
>  -       {"updunno", NETXEN_NIC_STAT(stats.updunno)},
>         {"tx_dropped", NETXEN_NIC_STAT(stats.txdropped)},
>         {"csummed", NETXEN_NIC_STAT(stats.csummed)},
>         {"no_rcv", NETXEN_NIC_STAT(stats.no_rcv)},
>  diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
>  index fe64618..d9713d9 100644
>  --- a/drivers/net/netxen/netxen_nic_init.c
>  +++ b/drivers/net/netxen/netxen_nic_init.c
>  @@ -1089,7 +1089,7 @@ static void netxen_process_rcv(struct netxen_adapter *adapter, int ctxid,
>         skb = (struct sk_buff *)buffer->skb;
>
>         if (likely(adapter->rx_csum &&
>  -                               netxen_get_sts_status(sts_data) == STATUS_CKSUM_OK)) {
>  +                       netxen_get_sts_status(sts_data) == STATUS_CKSUM_OK)) {
>                 adapter->stats.csummed++;
>                 skb->ip_summed = CHECKSUM_UNNECESSARY;
>         } else
>  @@ -1106,37 +1106,6 @@ static void netxen_process_rcv(struct netxen_adapter *adapter, int ctxid,
>         skb->protocol = eth_type_trans(skb, netdev);
>
>         ret = netif_receive_skb(skb);
>  -
>  -       /*
>  -        * RH: Do we need these stats on a regular basis. Can we get it from
>  -        * Linux stats.
>  -        */
>  -       switch (ret) {
>  -       case NET_RX_SUCCESS:
>  -               adapter->stats.uphappy++;
>  -               break;
>  -
>  -       case NET_RX_CN_LOW:
>  -               adapter->stats.uplcong++;
>  -               break;
>  -
>  -       case NET_RX_CN_MOD:
>  -               adapter->stats.upmcong++;
>  -               break;
>  -
>  -       case NET_RX_CN_HIGH:
>  -               adapter->stats.uphcong++;
>  -               break;
>  -
>  -       case NET_RX_DROP:
>  -               adapter->stats.updropped++;
>  -               break;
>  -
>  -       default:
>  -               adapter->stats.updunno++;
>  -               break;
>  -       }
>  -
>         netdev->last_rx = jiffies;
>
>         rcv_desc->rcv_pending--;
>  diff --git a/drivers/net/netxen/netxen_nic_isr.c b/drivers/net/netxen/netxen_nic_isr.c
>  index 1a2333a..c81313b 100644
>  --- a/drivers/net/netxen/netxen_nic_isr.c
>  +++ b/drivers/net/netxen/netxen_nic_isr.c
>  @@ -59,7 +59,7 @@ struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev)
>         /* packet transmit problems */
>         stats->tx_errors = adapter->stats.nocmddescriptor;
>         /* no space in linux buffers    */
>  -       stats->rx_dropped = adapter->stats.updropped;
>  +       stats->rx_dropped = adapter->stats.rxdropped;
>         /* no space available in linux  */
>         stats->tx_dropped = adapter->stats.txdropped;
>
>
>  --
>  To unsubscribe from this list: send the line "unsubscribe netdev" in
>  the body of a message to majordomo@...r.kernel.org
>  More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ