Thread (1 message) 1 message, 1 author, 2016-10-15

Re: [PATCH] ethtool: Zero memory allocated for statistics

From: David Miller <davem@davemloft.net>
Date: 2016-10-15 15:27:56

From: Vlad Tsyrklevich <redacted>
Date: Sat, 15 Oct 2016 15:11:08 +0000
I agree that we should propagate those errors and I'll prepare a new change
to do so for phy_driver.get_stats(), ethtool_ops.self_test(), and
ethtool_ops.get_ethtool_stats(). However, I still think this change should
be adopted. 3/5 of the cases here are reachable without any special
capabilities and programming defensively at the ethtool interface can
eliminate an entire class of potential driver bugs instead of fixing them
one by one. For example, get_eeprom() propagates errors but with a brief
grep I found that qlcnic_get_eeprom() will return 0 incorrectly even though
it read nothing for some NICs. Deeper bugs are undoubtedly laying around.
I'm all for defensive program when practical.

But statistics gathering is highly performance sensitive for many
important use cases, so I'm not ready to add a whole bzero() here
unless absolutely, positively, necessary.

Thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help