* Bug: alx: Atheros AR8131/AR8151/AR8152/AR8161 Ethernet driver
@ 2013-08-06 5:31 Kinley Dorji
2013-08-06 5:57 ` Stephen Hemminger
0 siblings, 1 reply; 9+ messages in thread
From: Kinley Dorji @ 2013-08-06 5:31 UTC (permalink / raw)
To: netdev
Hi,
I'd like to report a bug that has been introduced since the mainlining
of the NIC drivers originally in the package AUR/dkms-alx pertaining
to the above mentioned network cards.
Kernels affected: 3.10.1 - 3.10.5
All worked well for kernels <= 3.9.9
Environment in which it occurs:
kernel: >= 3.10
conky: any version (gui/cli)
NIC: Any one of the above family
conky variables that probe the NIC all return nothing or 0: eg:
upspeed, upspeedgraph, downspeed, downspeedgraph
A small discussion on the issue:
https://bbs.archlinux.org/viewtopic.php?id=166555
Network connectivity itself is not a problem - connection works and is stable
Conky isn't the problem because it works in kernels <= 3.9.9 with dkms-alx.
Hope it can be resolved, at your convenience.
Thank you for the good work you do,
Kinley
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Bug: alx: Atheros AR8131/AR8151/AR8152/AR8161 Ethernet driver
2013-08-06 5:31 Bug: alx: Atheros AR8131/AR8151/AR8152/AR8161 Ethernet driver Kinley Dorji
@ 2013-08-06 5:57 ` Stephen Hemminger
2013-08-06 6:05 ` Kinley Dorji
2013-08-06 6:23 ` Kinley Dorji
0 siblings, 2 replies; 9+ messages in thread
From: Stephen Hemminger @ 2013-08-06 5:57 UTC (permalink / raw)
To: Kinley Dorji; +Cc: netdev
On Tue, 6 Aug 2013 11:31:39 +0600
Kinley Dorji <kinleyd@gmail.com> wrote:
> Hi,
>
> I'd like to report a bug that has been introduced since the mainlining
> of the NIC drivers originally in the package AUR/dkms-alx pertaining
> to the above mentioned network cards.
>
> Kernels affected: 3.10.1 - 3.10.5
> All worked well for kernels <= 3.9.9
>
> Environment in which it occurs:
>
> kernel: >= 3.10
> conky: any version (gui/cli)
> NIC: Any one of the above family
>
> conky variables that probe the NIC all return nothing or 0: eg:
> upspeed, upspeedgraph, downspeed, downspeedgraph
>
> A small discussion on the issue:
> https://bbs.archlinux.org/viewtopic.php?id=166555
>
> Network connectivity itself is not a problem - connection works and is stable
>
> Conky isn't the problem because it works in kernels <= 3.9.9 with dkms-alx.
>
What is conky using to read the variables. Perhaps looking at
CLI tools like:
ip -s -d li show dev eth0
or
ethtool -S eth0
would give some indication of which variables are not being incremented.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Bug: alx: Atheros AR8131/AR8151/AR8152/AR8161 Ethernet driver
2013-08-06 5:57 ` Stephen Hemminger
@ 2013-08-06 6:05 ` Kinley Dorji
2013-08-06 10:43 ` Eric Dumazet
2013-08-06 6:23 ` Kinley Dorji
1 sibling, 1 reply; 9+ messages in thread
From: Kinley Dorji @ 2013-08-06 6:05 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
No sure what conky is using to read them. This is what I get
$ ip -s -d li show dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP mode DEFAULT qlen 1000
link/ether 90:2b:34:da:42:fd brd ff:ff:ff:ff:ff:ff promiscuity 0
RX: bytes packets errors dropped overrun mcast
0 0 0 62 0 0
TX: bytes packets errors dropped carrier collsns
0 0 0 0 0 0
$ ethtool -S eth0
no stats available
On Tue, Aug 6, 2013 at 11:57 AM, Stephen Hemminger
<stephen@networkplumber.org> wrote:
> On Tue, 6 Aug 2013 11:31:39 +0600
> Kinley Dorji <kinleyd@gmail.com> wrote:
>
>> Hi,
>>
>> I'd like to report a bug that has been introduced since the mainlining
>> of the NIC drivers originally in the package AUR/dkms-alx pertaining
>> to the above mentioned network cards.
>>
>> Kernels affected: 3.10.1 - 3.10.5
>> All worked well for kernels <= 3.9.9
>>
>> Environment in which it occurs:
>>
>> kernel: >= 3.10
>> conky: any version (gui/cli)
>> NIC: Any one of the above family
>>
>> conky variables that probe the NIC all return nothing or 0: eg:
>> upspeed, upspeedgraph, downspeed, downspeedgraph
>>
>> A small discussion on the issue:
>> https://bbs.archlinux.org/viewtopic.php?id=166555
>>
>> Network connectivity itself is not a problem - connection works and is stable
>>
>> Conky isn't the problem because it works in kernels <= 3.9.9 with dkms-alx.
>>
>
> What is conky using to read the variables. Perhaps looking at
> CLI tools like:
> ip -s -d li show dev eth0
> or
> ethtool -S eth0
>
> would give some indication of which variables are not being incremented.
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Bug: alx: Atheros AR8131/AR8151/AR8152/AR8161 Ethernet driver
2013-08-06 5:57 ` Stephen Hemminger
2013-08-06 6:05 ` Kinley Dorji
@ 2013-08-06 6:23 ` Kinley Dorji
1 sibling, 0 replies; 9+ messages in thread
From: Kinley Dorji @ 2013-08-06 6:23 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: netdev
[-- Attachment #1: Type: text/plain, Size: 1275 bytes --]
I'm attaching the source code for what looks like the relevant conky
code related to the variables.
On Tue, Aug 6, 2013 at 11:57 AM, Stephen Hemminger
<stephen@networkplumber.org> wrote:
> On Tue, 6 Aug 2013 11:31:39 +0600
> Kinley Dorji <kinleyd@gmail.com> wrote:
>
>> Hi,
>>
>> I'd like to report a bug that has been introduced since the mainlining
>> of the NIC drivers originally in the package AUR/dkms-alx pertaining
>> to the above mentioned network cards.
>>
>> Kernels affected: 3.10.1 - 3.10.5
>> All worked well for kernels <= 3.9.9
>>
>> Environment in which it occurs:
>>
>> kernel: >= 3.10
>> conky: any version (gui/cli)
>> NIC: Any one of the above family
>>
>> conky variables that probe the NIC all return nothing or 0: eg:
>> upspeed, upspeedgraph, downspeed, downspeedgraph
>>
>> A small discussion on the issue:
>> https://bbs.archlinux.org/viewtopic.php?id=166555
>>
>> Network connectivity itself is not a problem - connection works and is stable
>>
>> Conky isn't the problem because it works in kernels <= 3.9.9 with dkms-alx.
>>
>
> What is conky using to read the variables. Perhaps looking at
> CLI tools like:
> ip -s -d li show dev eth0
> or
> ethtool -S eth0
>
> would give some indication of which variables are not being incremented.
>
[-- Attachment #2: net_stat.c --]
[-- Type: text/x-csrc, Size: 10152 bytes --]
/* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
* vim: ts=4 sw=4 noet ai cindent syntax=c
*
* Conky, a system monitor, based on torsmo
*
* Any original torsmo code is licensed under the BSD license
*
* All code written since the fork of torsmo is licensed under the GPL
*
* Please see COPYING for details
*
* Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
* Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al.
* (see AUTHORS)
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "config.h"
#include "conky.h"
#include "logging.h"
#include "specials.h"
#include "net/if.h"
#include "text_object.h"
#include "net_stat.h"
#include <netinet/in.h>
#include <errno.h>
#include <string.h>
#include <sys/ioctl.h>
#include <unistd.h>
/* network interface stuff */
struct net_stat netstats[MAX_NET_INTERFACES];
struct net_stat *get_net_stat(const char *dev, void *free_at_crash1, void *free_at_crash2)
{
unsigned int i;
if (!dev) {
return 0;
}
/* find interface stat */
for (i = 0; i < MAX_NET_INTERFACES; i++) {
if (netstats[i].dev && strcmp(netstats[i].dev, dev) == 0) {
return &netstats[i];
}
}
/* wasn't found? add it */
for (i = 0; i < MAX_NET_INTERFACES; i++) {
if (netstats[i].dev == 0) {
netstats[i].dev = strndup(dev, text_buffer_size);
return &netstats[i];
}
}
CRIT_ERR(free_at_crash1, free_at_crash2, "too many interfaces used (limit is %d)", MAX_NET_INTERFACES);
return 0;
}
void parse_net_stat_arg(struct text_object *obj, const char *arg, void *free_at_crash)
{
if (!arg)
arg = DEFAULTNETDEV;
obj->data.opaque = get_net_stat(arg, obj, free_at_crash);
}
void parse_net_stat_bar_arg(struct text_object *obj, const char *arg, void *free_at_crash)
{
if (arg) {
arg = scan_bar(obj, arg);
obj->data.opaque = get_net_stat(arg, obj, free_at_crash);
} else {
// default to DEFAULTNETDEV
char *buf = strndup(DEFAULTNETDEV, text_buffer_size);
obj->data.opaque = get_net_stat(buf, obj, free_at_crash);
free(buf);
}
}
void print_downspeed(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns)
return;
human_readable(ns->recv_speed, p, p_max_size);
}
void print_downspeedf(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns)
return;
spaced_print(p, p_max_size, "%.1f", 8, ns->recv_speed / 1024.0);
}
void print_upspeed(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns)
return;
human_readable(ns->trans_speed, p, p_max_size);
}
void print_upspeedf(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns)
return;
spaced_print(p, p_max_size, "%.1f", 8, ns->trans_speed / 1024.0);
}
void print_totaldown(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns)
return;
human_readable(ns->recv, p, p_max_size);
}
void print_totalup(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns)
return;
human_readable(ns->trans, p, p_max_size);
}
void print_addr(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns)
return;
if ((ns->addr.sa_data[2] & 255) == 0 &&
(ns->addr.sa_data[3] & 255) == 0 &&
(ns->addr.sa_data[4] & 255) == 0 &&
(ns->addr.sa_data[5] & 255) == 0) {
snprintf(p, p_max_size, "No Address");
} else {
snprintf(p, p_max_size, "%u.%u.%u.%u",
ns->addr.sa_data[2] & 255,
ns->addr.sa_data[3] & 255,
ns->addr.sa_data[4] & 255,
ns->addr.sa_data[5] & 255);
}
}
#ifdef __linux__
void print_addrs(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns)
return;
if (NULL != ns->addrs && strlen(ns->addrs) > 2) {
ns->addrs[strlen(ns->addrs) - 2] = 0; /* remove ", " from end of string */
strncpy(p, ns->addrs, p_max_size);
} else {
strncpy(p, "0.0.0.0", p_max_size);
}
}
#endif /* __linux__ */
#ifdef X11
void parse_net_stat_graph_arg(struct text_object *obj, const char *arg, void *free_at_crash)
{
char *buf = 0;
buf = scan_graph(obj, arg, 0);
// default to DEFAULTNETDEV
if (buf) {
obj->data.opaque = get_net_stat(buf, obj, free_at_crash);
free(buf);
return;
}
obj->data.opaque = get_net_stat(DEFAULTNETDEV, obj, free_at_crash);
}
void print_downspeedgraph(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns || !p_max_size)
return;
new_graph(obj, p, p_max_size, ns->recv_speed / 1024.0);
}
void print_upspeedgraph(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns || !p_max_size)
return;
new_graph(obj, p, p_max_size, ns->trans_speed / 1024.0);
}
#endif /* X11 */
#ifdef __linux__
#ifdef HAVE_IWLIB
void print_wireless_essid(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns)
return;
snprintf(p, p_max_size, "%s", ns->essid);
}
void print_wireless_mode(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns)
return;
snprintf(p, p_max_size, "%s", ns->mode);
}
void print_wireless_bitrate(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns)
return;
snprintf(p, p_max_size, "%s", ns->bitrate);
}
void print_wireless_ap(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns)
return;
snprintf(p, p_max_size, "%s", ns->ap);
}
void print_wireless_link_qual(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns)
return;
spaced_print(p, p_max_size, "%d", 4, ns->link_qual);
}
void print_wireless_link_qual_max(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns)
return;
spaced_print(p, p_max_size, "%d", 4, ns->link_qual_max);
}
void print_wireless_link_qual_perc(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns)
return;
if (ns->link_qual_max > 0) {
spaced_print(p, p_max_size, "%.0f", 5,
(double) ns->link_qual /
ns->link_qual_max * 100);
} else {
spaced_print(p, p_max_size, "unk", 5);
}
}
void print_wireless_link_bar(struct text_object *obj, char *p, int p_max_size)
{
struct net_stat *ns = obj->data.opaque;
if (!ns)
return;
new_bar(obj, p, p_max_size,
((double) ns->link_qual / ns->link_qual_max) * 255.0);
}
#endif /* HAVE_IWLIB */
#endif /* __linux__ */
void clear_net_stats(void)
{
int i;
for (i = 0; i < MAX_NET_INTERFACES; i++) {
if (netstats[i].dev) {
free(netstats[i].dev);
}
}
memset(netstats, 0, sizeof(netstats));
}
void parse_if_up_arg(struct text_object *obj, const char *arg)
{
obj->data.opaque = strndup(arg, text_buffer_size);
}
void free_if_up(struct text_object *obj)
{
if (obj->data.opaque) {
free(obj->data.opaque);
obj->data.opaque = NULL;
}
}
/* We should check if this is ok with OpenBSD and NetBSD as well. */
int interface_up(struct text_object *obj)
{
int fd;
struct ifreq ifr;
char *dev = obj->data.opaque;
if (!dev)
return 0;
if ((fd = socket(PF_INET, SOCK_DGRAM, 0)) < 0) {
CRIT_ERR(NULL, NULL, "could not create sockfd");
return 0;
}
strncpy(ifr.ifr_name, dev, IFNAMSIZ);
if (ioctl(fd, SIOCGIFFLAGS, &ifr)) {
/* if device does not exist, treat like not up */
if (errno != ENODEV && errno != ENXIO)
perror("SIOCGIFFLAGS");
goto END_FALSE;
}
if (!(ifr.ifr_flags & IFF_UP)) /* iface is not up */
goto END_FALSE;
if (ifup_strictness == IFUP_UP)
goto END_TRUE;
if (!(ifr.ifr_flags & IFF_RUNNING))
goto END_FALSE;
if (ifup_strictness == IFUP_LINK)
goto END_TRUE;
if (ioctl(fd, SIOCGIFADDR, &ifr)) {
perror("SIOCGIFADDR");
goto END_FALSE;
}
if (((struct sockaddr_in *)&(ifr.ifr_ifru.ifru_addr))->sin_addr.s_addr)
goto END_TRUE;
END_FALSE:
close(fd);
return 0;
END_TRUE:
close(fd);
return 1;
}
static struct {
int nscount;
char **ns_list;
} dns_data = {
.nscount = 0,
.ns_list = NULL,
};
void free_dns_data(void)
{
int i;
for (i = 0; i < dns_data.nscount; i++)
free(dns_data.ns_list[i]);
if (dns_data.ns_list)
free(dns_data.ns_list);
memset(&dns_data, 0, sizeof(dns_data));
}
int update_dns_data(void)
{
FILE *fp;
char line[256];
//static double last_dns_update = 0.0;
/* maybe updating too often causes higher load because of /etc lying on a real FS
if (current_update_time - last_dns_update < 10.0)
return;
last_dns_update = current_update_time;
*/
free_dns_data();
if ((fp = fopen("/etc/resolv.conf", "r")) == NULL)
return 0;
while(!feof(fp)) {
if (fgets(line, 255, fp) == NULL) {
break;
}
if (!strncmp(line, "nameserver ", 11)) {
line[strlen(line) - 1] = '\0'; // remove trailing newline
dns_data.nscount++;
dns_data.ns_list = realloc(dns_data.ns_list, dns_data.nscount * sizeof(char *));
dns_data.ns_list[dns_data.nscount - 1] = strndup(line + 11, text_buffer_size);
}
}
fclose(fp);
return 0;
}
void parse_nameserver_arg(struct text_object *obj, const char *arg)
{
obj->data.l = arg ? atoi(arg) : 0;
}
void print_nameserver(struct text_object *obj, char *p, int p_max_size)
{
if (dns_data.nscount > obj->data.l)
snprintf(p, p_max_size, "%s", dns_data.ns_list[obj->data.l]);
}
[-- Attachment #3: net_stat.h --]
[-- Type: text/x-chdr, Size: 3693 bytes --]
/* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
* vim: ts=4 sw=4 noet ai cindent syntax=c
*
* Conky, a system monitor, based on torsmo
*
* Any original torsmo code is licensed under the BSD license
*
* All code written since the fork of torsmo is licensed under the GPL
*
* Please see COPYING for details
*
* Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
* Copyright (c) 2005-2010 Brenden Matthews, Philip Kovacs, et. al.
* (see AUTHORS)
* All rights reserved.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#ifndef _NET_STAT_H
#define _NET_STAT_H
#include <sys/socket.h> /* struct sockaddr */
struct net_stat {
char *dev;
int up;
long long last_read_recv, last_read_trans;
long long recv, trans;
double recv_speed, trans_speed;
struct sockaddr addr;
#if defined(__linux__)
char addrs[17 * MAX_NET_INTERFACES + 1];
#endif /* __linux__ */
double net_rec[15], net_trans[15];
// wireless extensions
char essid[32];
char bitrate[16];
char mode[16];
int link_qual;
int link_qual_max;
char ap[18];
};
extern struct net_stat netstats[];
struct net_stat *get_net_stat(const char *, void *, void *);
void parse_net_stat_arg(struct text_object *, const char *, void *);
void parse_net_stat_bar_arg(struct text_object *, const char *, void *);
void print_downspeed(struct text_object *, char *, int);
void print_downspeedf(struct text_object *, char *, int);
void print_upspeed(struct text_object *, char *, int);
void print_upspeedf(struct text_object *, char *, int);
void print_totaldown(struct text_object *, char *, int);
void print_totalup(struct text_object *, char *, int);
void print_addr(struct text_object *, char *, int);
#ifdef __linux__
void print_addrs(struct text_object *, char *, int);
#endif /* __linux__ */
#ifdef X11
void parse_net_stat_graph_arg(struct text_object *, const char *, void *);
void print_downspeedgraph(struct text_object *, char *, int);
void print_upspeedgraph(struct text_object *, char *, int);
#endif /* X11 */
#ifdef __linux__
#ifdef HAVE_IWLIB
void print_wireless_essid(struct text_object *, char *, int);
void print_wireless_mode(struct text_object *, char *, int);
void print_wireless_bitrate(struct text_object *, char *, int);
void print_wireless_ap(struct text_object *, char *, int);
void print_wireless_link_qual(struct text_object *, char *, int);
void print_wireless_link_qual_max(struct text_object *, char *, int);
void print_wireless_link_qual_perc(struct text_object *, char *, int);
void print_wireless_link_bar(struct text_object *, char *, int);
#endif /* HAVE_IWLIB */
#endif /* __linux__ */
void clear_net_stats(void);
void parse_if_up_arg(struct text_object *, const char *);
int interface_up(struct text_object *);
void free_if_up(struct text_object *);
void free_dns_data(void);
int update_dns_data(void);
void parse_nameserver_arg(struct text_object *, const char *);
void print_nameserver(struct text_object *, char *, int);
#endif /* _NET_STAT_H */
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Bug: alx: Atheros AR8131/AR8151/AR8152/AR8161 Ethernet driver
2013-08-06 6:05 ` Kinley Dorji
@ 2013-08-06 10:43 ` Eric Dumazet
2013-08-06 11:32 ` Johannes Berg
0 siblings, 1 reply; 9+ messages in thread
From: Eric Dumazet @ 2013-08-06 10:43 UTC (permalink / raw)
To: Kinley Dorji; +Cc: Stephen Hemminger, netdev, Johannes Berg
On Tue, 2013-08-06 at 12:05 +0600, Kinley Dorji wrote:
> No sure what conky is using to read them. This is what I get
>
> $ ip -s -d li show dev eth0
> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
> state UP mode DEFAULT qlen 1000
> link/ether 90:2b:34:da:42:fd brd ff:ff:ff:ff:ff:ff promiscuity 0
> RX: bytes packets errors dropped overrun mcast
> 0 0 0 62 0 0
> TX: bytes packets errors dropped carrier collsns
> 0 0 0 0 0 0
>
> $ ethtool -S eth0
> no stats available
It seems alx driver does not support stats.
(No ndo_get_stats() and no changes on netdev->stats embedded stats)
drivers/net/ethernet/atheros/atl1c/atl1c_main.c provides
atl1c_get_stats() gathering hardware counters
CC Johannes Berg, let see if he has plan to add them on alx
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Bug: alx: Atheros AR8131/AR8151/AR8152/AR8161 Ethernet driver
2013-08-06 10:43 ` Eric Dumazet
@ 2013-08-06 11:32 ` Johannes Berg
2013-08-06 12:07 ` Eric Dumazet
0 siblings, 1 reply; 9+ messages in thread
From: Johannes Berg @ 2013-08-06 11:32 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Kinley Dorji, Stephen Hemminger, netdev
On Tue, 2013-08-06 at 03:43 -0700, Eric Dumazet wrote:
> > $ ethtool -S eth0
> > no stats available
>
> It seems alx driver does not support stats.
>
> (No ndo_get_stats() and no changes on netdev->stats embedded stats)
>
>
> drivers/net/ethernet/atheros/atl1c/atl1c_main.c provides
> atl1c_get_stats() gathering hardware counters
>
> CC Johannes Berg, let see if he has plan to add them on alx
I don't. There are some stats in the original code at
https://github.com/erikarn/alx, but I removed them because I didn't
really understand what was going on and don't really care much for the
stats in the system I'm using this device on - and based on the driver
I'm not sure I'd use the chip for 'serious' work anyway :)
FWIW, it had ndo_get_stats() but was updating the netdev->stats from
that handler and then returning them, which seemed a bit questionable.
johannes
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Bug: alx: Atheros AR8131/AR8151/AR8152/AR8161 Ethernet driver
2013-08-06 11:32 ` Johannes Berg
@ 2013-08-06 12:07 ` Eric Dumazet
2013-08-07 6:32 ` Kinley Dorji
0 siblings, 1 reply; 9+ messages in thread
From: Eric Dumazet @ 2013-08-06 12:07 UTC (permalink / raw)
To: Johannes Berg; +Cc: Kinley Dorji, Stephen Hemminger, netdev
On Tue, 2013-08-06 at 13:32 +0200, Johannes Berg wrote:
> I don't. There are some stats in the original code at
> https://github.com/erikarn/alx, but I removed them because I didn't
> really understand what was going on and don't really care much for the
> stats in the system I'm using this device on - and based on the driver
> I'm not sure I'd use the chip for 'serious' work anyway :)
>
OK, their code seems clean and should be copied/pasted.
> FWIW, it had ndo_get_stats() but was updating the netdev->stats from
> that handler and then returning them, which seemed a bit questionable.
>
Its fine, as updates of each field are atomic (unsigned long)
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Bug: alx: Atheros AR8131/AR8151/AR8152/AR8161 Ethernet driver
2013-08-06 12:07 ` Eric Dumazet
@ 2013-08-07 6:32 ` Kinley Dorji
2014-01-08 22:53 ` Sam
0 siblings, 1 reply; 9+ messages in thread
From: Kinley Dorji @ 2013-08-07 6:32 UTC (permalink / raw)
To: Eric Dumazet; +Cc: Johannes Berg, Stephen Hemminger, netdev
@Johannes Berg: > don't really care much for the
> stats in the system I'm using this device on - and based on the driver
> I'm not sure I'd use the chip for 'serious' work anyway :)
OTOH, conky users love having the stats up, even if they aren't precise. :)
There's one other point:
Before the mainlining of the alx drivers, the default settings for
Wake-on used to be d, whereas now it seems to be pg. This startled me
a couple of times with my computer turning on unexpectedly, having
been used to the previous defaults. Just FYI.
Other than that, I would like thank you all very much for your quick
responses and I look forward to having the stats code restored to the
alx drivers.
With best regards,
Kinley
On Tue, Aug 6, 2013 at 6:07 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
> On Tue, 2013-08-06 at 13:32 +0200, Johannes Berg wrote:
>
>> I don't. There are some stats in the original code at
>> https://github.com/erikarn/alx, but I removed them because I didn't
>> really understand what was going on and don't really care much for the
>> stats in the system I'm using this device on - and based on the driver
>> I'm not sure I'd use the chip for 'serious' work anyway :)
>>
>
> OK, their code seems clean and should be copied/pasted.
>
>
>> FWIW, it had ndo_get_stats() but was updating the netdev->stats from
>> that handler and then returning them, which seemed a bit questionable.
>>
>
> Its fine, as updates of each field are atomic (unsigned long)
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Bug: alx: Atheros AR8131/AR8151/AR8152/AR8161 Ethernet driver
2013-08-07 6:32 ` Kinley Dorji
@ 2014-01-08 22:53 ` Sam
0 siblings, 0 replies; 9+ messages in thread
From: Sam @ 2014-01-08 22:53 UTC (permalink / raw)
To: netdev
Kinley Dorji <kinleyd <at> gmail.com> writes:
>
> <at> Johannes Berg: > don't really care much for the
> > stats in the system I'm using this device on - and based on the driver
> > I'm not sure I'd use the chip for 'serious' work anyway :)
>
> OTOH, conky users love having the stats up, even if they aren't precise. :)
>
> There's one other point:
>
> Before the mainlining of the alx drivers, the default settings for
> Wake-on used to be d, whereas now it seems to be pg. This startled me
> a couple of times with my computer turning on unexpectedly, having
> been used to the previous defaults. Just FYI.
>
> Other than that, I would like thank you all very much for your quick
> responses and I look forward to having the stats code restored to the
> alx drivers.
>
> With best regards,
>
> Kinley
>
Hi guys,
I am experiencing this bug on a 3.11 kernel.
Can you tell me if the fix has been released upstream? in which kernel version?
Thanks
Regards
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-01-08 23:00 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-06 5:31 Bug: alx: Atheros AR8131/AR8151/AR8152/AR8161 Ethernet driver Kinley Dorji
2013-08-06 5:57 ` Stephen Hemminger
2013-08-06 6:05 ` Kinley Dorji
2013-08-06 10:43 ` Eric Dumazet
2013-08-06 11:32 ` Johannes Berg
2013-08-06 12:07 ` Eric Dumazet
2013-08-07 6:32 ` Kinley Dorji
2014-01-08 22:53 ` Sam
2013-08-06 6:23 ` Kinley Dorji
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).