* Re: [PATCH 1/2] net/netfilter/ipvs: Move #define KMSG_COMPONENT to Makefile
From: Jan Engelhardt @ 2009-10-01 0:31 UTC (permalink / raw)
To: Joe Perches
Cc: Patrick McHardy, David S. Miller, Simon Horman, Julian Anastasov,
netfilter-devel, coreteam, netdev, linux-kernel, lvs-devel
In-Reply-To: <1254352160.2960.119.camel@Joe-Laptop.home>
On Thursday 2009-10-01 01:09, Joe Perches wrote:
>On Thu, 2009-10-01 at 00:46 +0200, Jan Engelhardt wrote:
>> On Thursday 2009-10-01 00:37, Joe Perches wrote:
>> >This centralizes the definition and removes the
>> >replicated #defines from all files
>
>I think this increased command line length hardly matters.
>
>I think a reasonable complaint might be that it separates
>the definition of a macro from the code. I think it's
>similar to the already used KBUILD_MODNAME macro though.
KBUILD_MODNAME is special in that it is derived from the actual
source filename. Of course you could put #define KBUILD_MODNAME "foo"
in your source file, but that is like putting changelogs there
when they belong into the git log.
>> How about an #include file for the ipvs private things?
>
>It's not just IPVS, this style could be used treewide
>without requiring extra #includes.
Well I personally prefer the #include instead of hiding such in
Makefiles. You know, when newcomers could start doing `grep
KMSG_COMPONENT *.[ch]`. Perhaps GCC's -include flag in a Makefile
to avoid #includes in .c files?
^ permalink raw reply
* Re: [PATCH 2.6.32-rc1] net: VMware virtual Ethernet NIC driver: vmxnet3
From: Stephen Hemminger @ 2009-10-01 0:39 UTC (permalink / raw)
To: Shreyas Bhatewara
Cc: linux-kernel, netdev, Stephen Hemminger, David S. Miller,
Jeff Garzik, Anthony Liguori, Chris Wright, Greg Kroah-Hartman,
Andrew Morton, virtualization, pv-drivers
In-Reply-To: <alpine.LRH.2.00.0909301432410.8073@localhost.localdomain>
On Wed, 30 Sep 2009 14:34:57 -0700 (PDT)
Shreyas Bhatewara <sbhatewara@vmware.com> wrote:
Note: your patch was linewrapped again
> +
> +
> +static void
> +vmxnet3_declare_features(struct vmxnet3_adapter *adapter, bool dma64)
> +{
> + struct net_device *netdev = adapter->netdev;
> +
> + netdev->features = NETIF_F_SG |
> + NETIF_F_HW_CSUM |
> + NETIF_F_HW_VLAN_TX |
> + NETIF_F_HW_VLAN_RX |
> + NETIF_F_HW_VLAN_FILTER |
> + NETIF_F_TSO |
> + NETIF_F_TSO6;
> +
> + printk(KERN_INFO "features: sg csum vlan jf tso tsoIPv6");
> +
> + adapter->rxcsum = true;
> + adapter->jumbo_frame = true;
> +
> + if (!disable_lro) {
> + adapter->lro = true;
> + printk(" lro");
> + }
Why not use NETIF_F_LRO and ethtool to control LRO support?
^ permalink raw reply
* Re: [PATCH 1/2] net/netfilter/ipvs: Move #define KMSG_COMPONENT to Makefile
From: Joe Perches @ 2009-10-01 0:50 UTC (permalink / raw)
To: Jan Engelhardt
Cc: Patrick McHardy, David S. Miller, Simon Horman, Julian Anastasov,
netfilter-devel, coreteam, netdev, linux-kernel, lvs-devel
In-Reply-To: <alpine.LSU.2.00.0910010219100.7559@obet.zrqbmnf.qr>
On Thu, 2009-10-01 at 02:31 +0200, Jan Engelhardt wrote:
> KBUILD_MODNAME is special in that it is derived from the actual
> source filename.
Kind of. It's derived from the module name, not the filename.
> Of course you could put #define KBUILD_MODNAME "foo"
> in your source file, but that is like putting changelogs there
> when they belong into the git log.
I agree with that.
> Well I personally prefer the #include instead of hiding such in
> Makefiles. You know, when newcomers could start doing `grep
> KMSG_COMPONENT *.[ch]`. Perhaps GCC's -include flag in a Makefile
> to avoid #includes in .c files?
I imagine an eventual goal of standardizing the default
pr_fmt define in kernel.h to
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
so that all pr_<level> calls get this unless otherwise
specified.
Or perhaps better, to get rid of pr_fmt(fmt) altogether and
have printk emit the filename/modulename, function and/or
code offset by using something like %pS after the level.
I see the Makefile use, which I don't really like too much
because of the information hiding, as an intermediate step
until that's possible.
^ permalink raw reply
* Re: [PATCH 0/2] cfg80211: firmware and hardware version
From: John W. Linville @ 2009-10-01 1:13 UTC (permalink / raw)
To: Luis R. Rodriguez; +Cc: Kalle Valo, linux-wireless, netdev
In-Reply-To: <43e72e890909250953r1714c79bsa679b96ca6f5797@mail.gmail.com>
On Fri, Sep 25, 2009 at 09:53:35AM -0700, Luis R. Rodriguez wrote:
> On Fri, Sep 25, 2009 at 9:47 AM, Kalle Valo <kalle.valo@iki.fi> wrote:
> > But we want to export two strings to user space (at least for now), is
> > it really worth the effort to add ethtool support for such a minor
> > feature? Also I have understood that ethtool is implemented only for
> > ethernet drivers, I don't feel comfortable that we use ethernet driver
> > interfaces with 802.11 device drivers. They are so much different that
> > there isn't that much common functionality. That's why I prefer
> > nl80211 over ethtool.
> >
> > What do people think?
>
> So for Wake-on-Wireless I ran into the same, ethtool just did not
> offer the same wake up events needed for wireless. I could have
> technically used ethtool and expanded it to support wireless but it
> just seemed dirty.
>
> I agree that using ethtool seems overkill compared to the patches you posted.
I think you either overestimate the amount of trouble for implementing
(minimal) ethtool support or you underestimate the amount of
functionality available through that interface. That, or you just
don't like using something named "eth"tool for wireless -- but hey,
let's be honest about the frames we send/receive to/from the kernel...
:-)
The ethtool interface provides functionality for viewing and modifying
eeprom contents, dumping registers, trigger self-tests, basic driver
info, getting and setting message reporting levels, external card
identification (hey, _could_ be useful!), and some other bits like
checksum offload that might(?) be useful in the future. I understand
regarding the WoW vs. WoL issue but probably the answer is just to
add a new method for WoW...?
I'll post a patch series based on what Kalle sent but using ethtool
instead of nl80211...
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* RE: [PATCH 2.6.32-rc1] net: VMware virtual Ethernet NIC driver: vmxnet3
From: Shreyas Bhatewara @ 2009-10-01 1:18 UTC (permalink / raw)
To: Stephen Hemminger
Cc: linux-kernel, netdev, Stephen Hemminger, David S. Miller,
Jeff Garzik, Anthony Liguori, Chris Wright, Greg Kroah-Hartman,
Andrew Morton, virtualization, pv-drivers
In-Reply-To: <20090930173923.4520716a@s6510>
Stephen,
Thanks for taking a look.
> -----Original Message-----
> From: Stephen Hemminger [mailto:shemminger@vyatta.com]
> Sent: Wednesday, September 30, 2009 5:39 PM
> To: Shreyas Bhatewara
> Cc: linux-kernel; netdev; Stephen Hemminger; David S. Miller; Jeff
> Garzik; Anthony Liguori; Chris Wright; Greg Kroah-Hartman; Andrew
> Morton; virtualization; pv-drivers
> Subject: Re: [PATCH 2.6.32-rc1] net: VMware virtual Ethernet NIC
> driver: vmxnet3
>
> On Wed, 30 Sep 2009 14:34:57 -0700 (PDT)
> Shreyas Bhatewara <sbhatewara@vmware.com> wrote:
>
> Note: your patch was linewrapped again
>
Fixed the alpine option. Should not happen again.
> > +
> > +
> > +static void
> > +vmxnet3_declare_features(struct vmxnet3_adapter *adapter, bool
> dma64)
> > +{
> > + struct net_device *netdev = adapter->netdev;
> > +
> > + netdev->features = NETIF_F_SG |
> > + NETIF_F_HW_CSUM |
> > + NETIF_F_HW_VLAN_TX |
> > + NETIF_F_HW_VLAN_RX |
> > + NETIF_F_HW_VLAN_FILTER |
> > + NETIF_F_TSO |
> > + NETIF_F_TSO6;
> > +
> > + printk(KERN_INFO "features: sg csum vlan jf tso tsoIPv6");
> > +
> > + adapter->rxcsum = true;
> > + adapter->jumbo_frame = true;
> > +
> > + if (!disable_lro) {
> > + adapter->lro = true;
> > + printk(" lro");
> > + }
>
> Why not use NETIF_F_LRO and ethtool to control LRO support?
Yes, that would be a better way to do it. I will make that change.
^ permalink raw reply
* [PATCH 1/3] wireless: implement basic ethtool support for cfg80211 devices
From: John W. Linville @ 2009-10-01 1:19 UTC (permalink / raw)
To: linux-wireless-u79uwXL29TY76Z2rM5mHXA
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Kalle Valo, Kalle Valo,
Luis R. Rodriguez, John W. Linville
In-Reply-To: <20091001011340.GA3123-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
Signed-off-by: John W. Linville <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
---
net/wireless/Makefile | 2 +-
net/wireless/core.c | 3 +++
net/wireless/ethtool.c | 27 +++++++++++++++++++++++++++
net/wireless/ethtool.h | 10 ++++++++++
4 files changed, 41 insertions(+), 1 deletions(-)
create mode 100644 net/wireless/ethtool.c
create mode 100644 net/wireless/ethtool.h
diff --git a/net/wireless/Makefile b/net/wireless/Makefile
index c814150..f07c8dc 100644
--- a/net/wireless/Makefile
+++ b/net/wireless/Makefile
@@ -10,7 +10,7 @@ obj-$(CONFIG_WEXT_SPY) += wext-spy.o
obj-$(CONFIG_WEXT_PRIV) += wext-priv.o
cfg80211-y += core.o sysfs.o radiotap.o util.o reg.o scan.o nl80211.o
-cfg80211-y += mlme.o ibss.o sme.o chan.o
+cfg80211-y += mlme.o ibss.o sme.o chan.o ethtool.o
cfg80211-$(CONFIG_CFG80211_DEBUGFS) += debugfs.o
cfg80211-$(CONFIG_CFG80211_WEXT) += wext-compat.o wext-sme.o
diff --git a/net/wireless/core.c b/net/wireless/core.c
index c761532..faada5c 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -21,6 +21,7 @@
#include "sysfs.h"
#include "debugfs.h"
#include "wext-compat.h"
+#include "ethtool.h"
/* name for sysfs, %d is appended */
#define PHY_NAME "phy"
@@ -683,6 +684,8 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
wdev->wext.ps = false;
}
#endif
+ if (!dev->ethtool_ops)
+ dev->ethtool_ops = &cfg80211_ethtool_ops;
break;
case NETDEV_GOING_DOWN:
switch (wdev->iftype) {
diff --git a/net/wireless/ethtool.c b/net/wireless/ethtool.c
new file mode 100644
index 0000000..94ca377
--- /dev/null
+++ b/net/wireless/ethtool.c
@@ -0,0 +1,27 @@
+#include <linux/utsrelease.h>
+#include <net/cfg80211.h>
+#include "ethtool.h"
+
+const struct ethtool_ops cfg80211_ethtool_ops = {
+ .get_drvinfo = cfg80211_get_drvinfo,
+ .get_link = ethtool_op_get_link,
+};
+
+void cfg80211_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
+{
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+ strncpy(info->driver, wiphy_dev(wdev->wiphy)->driver->name,
+ sizeof(info->driver));
+ info->driver[sizeof(info->driver) - 1] = '\0';
+
+ strncpy(info->version, UTS_RELEASE, sizeof(info->version));
+ info->version[sizeof(info->version) - 1] = '\0';
+
+ strncpy(info->fw_version, "N/A", sizeof(info->fw_version));
+ info->fw_version[sizeof(info->fw_version) - 1] = '\0';
+
+ strncpy(info->bus_info, dev_name(wiphy_dev(wdev->wiphy)),
+ sizeof(info->bus_info));
+ info->bus_info[sizeof(info->bus_info) - 1] = '\0';
+}
diff --git a/net/wireless/ethtool.h b/net/wireless/ethtool.h
new file mode 100644
index 0000000..a51b470
--- /dev/null
+++ b/net/wireless/ethtool.h
@@ -0,0 +1,10 @@
+#ifndef __CFG80211_ETHTOOL__
+#define __CFG80211_ETHTOOL__
+
+#include <linux/ethtool.h>
+
+extern void cfg80211_get_drvinfo(struct net_device *, struct ethtool_drvinfo *);
+
+extern const struct ethtool_ops cfg80211_ethtool_ops;
+
+#endif /* __CFG80211_ETHTOOL__ */
--
1.6.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH 3/3] at76c50x-usb: set firmware and hardware version in wiphy
From: John W. Linville @ 2009-10-01 1:19 UTC (permalink / raw)
To: linux-wireless-u79uwXL29TY76Z2rM5mHXA
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, Kalle Valo, Kalle Valo,
Luis R. Rodriguez, John W. Linville
In-Reply-To: <1254359942-3483-2-git-send-email-linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
From: Kalle Valo <kalle.valo-X3B1VOXEql0@public.gmane.org>
Set firmware and hardware version in wiphy so that user space can access
it.
(Modification from original in favor of cfg80211 ethtool support. -- JWL)
Cc: Kalle Valo <kalle.valo-X3B1VOXEql0@public.gmane.org>
Signed-off-by: John W. Linville <linville-2XuSBdqkA4R54TAoqtyWWQ@public.gmane.org>
---
drivers/net/wireless/at76c50x-usb.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index 8e1a55d..533954d 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -2217,6 +2217,8 @@ static struct ieee80211_supported_band at76_supported_band = {
static int at76_init_new_device(struct at76_priv *priv,
struct usb_interface *interface)
{
+ struct wiphy *wiphy;
+ size_t len;
int ret;
/* set up the endpoint information */
@@ -2254,6 +2256,7 @@ static int at76_init_new_device(struct at76_priv *priv,
priv->device_unplugged = 0;
/* mac80211 initialisation */
+ wiphy = priv->hw->wiphy;
priv->hw->wiphy->max_scan_ssids = 1;
priv->hw->wiphy->max_scan_ie_len = 0;
priv->hw->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
@@ -2265,6 +2268,15 @@ static int at76_init_new_device(struct at76_priv *priv,
SET_IEEE80211_DEV(priv->hw, &interface->dev);
SET_IEEE80211_PERM_ADDR(priv->hw, priv->mac_addr);
+ len = sizeof(wiphy->fw_version);
+ snprintf(wiphy->fw_version, len, "%d.%d.%d-%d",
+ priv->fw_version.major, priv->fw_version.minor,
+ priv->fw_version.patch, priv->fw_version.build);
+ /* null terminate the strings in case they were truncated */
+ wiphy->fw_version[len - 1] = '\0';
+
+ wiphy->hw_version = priv->board_type;
+
ret = ieee80211_register_hw(priv->hw);
if (ret) {
printk(KERN_ERR "cannot register mac80211 hw (status %d)!\n",
--
1.6.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related
* [PATCH 2/3] cfg80211: add firmware and hardware version to wiphy
From: John W. Linville @ 2009-10-01 1:19 UTC (permalink / raw)
To: linux-wireless
Cc: netdev, Kalle Valo, Kalle Valo, Luis R. Rodriguez,
John W. Linville
In-Reply-To: <1254359942-3483-1-git-send-email-linville@tuxdriver.com>
From: Kalle Valo <kalle.valo@nokia.com>
It's useful to provide firmware and hardware version to user space and have a
generic interface to retrieve them. Users can provide the version information
in bug reports etc.
Add fields for firmware and hardware version to struct wiphy.
(Dropped nl80211 bits for now and modified remaining bits in favor of
ethtool. -- JWL)
Cc: Kalle Valo <kalle.valo@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
include/net/cfg80211.h | 3 +++
net/wireless/ethtool.c | 23 ++++++++++++++++++++++-
net/wireless/ethtool.h | 3 +++
3 files changed, 28 insertions(+), 1 deletions(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 241ea14..6f4862b 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1142,6 +1142,9 @@ struct wiphy {
u32 frag_threshold;
u32 rts_threshold;
+ char fw_version[ETHTOOL_BUSINFO_LEN];
+ u32 hw_version;
+
/* If multiple wiphys are registered and you're handed e.g.
* a regular netdev with assigned ieee80211_ptr, you won't
* know whether it points to a wiphy your driver has registered
diff --git a/net/wireless/ethtool.c b/net/wireless/ethtool.c
index 94ca377..3c59549 100644
--- a/net/wireless/ethtool.c
+++ b/net/wireless/ethtool.c
@@ -4,6 +4,8 @@
const struct ethtool_ops cfg80211_ethtool_ops = {
.get_drvinfo = cfg80211_get_drvinfo,
+ .get_regs_len = cfg80211_get_regs_len,
+ .get_regs = cfg80211_get_regs,
.get_link = ethtool_op_get_link,
};
@@ -18,10 +20,29 @@ void cfg80211_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
strncpy(info->version, UTS_RELEASE, sizeof(info->version));
info->version[sizeof(info->version) - 1] = '\0';
- strncpy(info->fw_version, "N/A", sizeof(info->fw_version));
+ if (wdev->wiphy->fw_version[0])
+ strncpy(info->fw_version, wdev->wiphy->fw_version,
+ sizeof(info->fw_version));
+ else
+ strncpy(info->fw_version, "N/A", sizeof(info->fw_version));
info->fw_version[sizeof(info->fw_version) - 1] = '\0';
strncpy(info->bus_info, dev_name(wiphy_dev(wdev->wiphy)),
sizeof(info->bus_info));
info->bus_info[sizeof(info->bus_info) - 1] = '\0';
}
+
+int cfg80211_get_regs_len(struct net_device *dev)
+{
+ /* For now, return 0... */
+ return 0;
+}
+
+void cfg80211_get_regs(struct net_device *dev, struct ethtool_regs *regs,
+ void *data)
+{
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+
+ regs->version = wdev->wiphy->hw_version;
+ regs->len = 0;
+}
diff --git a/net/wireless/ethtool.h b/net/wireless/ethtool.h
index a51b470..2d4602a 100644
--- a/net/wireless/ethtool.h
+++ b/net/wireless/ethtool.h
@@ -4,6 +4,9 @@
#include <linux/ethtool.h>
extern void cfg80211_get_drvinfo(struct net_device *, struct ethtool_drvinfo *);
+extern int cfg80211_get_regs_len(struct net_device *);
+extern void cfg80211_get_regs(struct net_device *, struct ethtool_regs *,
+ void *);
extern const struct ethtool_ops cfg80211_ethtool_ops;
--
1.6.2.5
^ permalink raw reply related
* Re: [PATCH 1/3] wireless: implement basic ethtool support for cfg80211 devices
From: Ben Hutchings @ 2009-10-01 1:30 UTC (permalink / raw)
To: John W. Linville
Cc: linux-wireless, netdev, Kalle Valo, Kalle Valo, Luis R. Rodriguez
In-Reply-To: <1254359942-3483-1-git-send-email-linville@tuxdriver.com>
On Wed, 2009-09-30 at 21:19 -0400, John W. Linville wrote:
[...]
> +void cfg80211_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
> +{
> + struct wireless_dev *wdev = dev->ieee80211_ptr;
> +
> + strncpy(info->driver, wiphy_dev(wdev->wiphy)->driver->name,
> + sizeof(info->driver));
> + info->driver[sizeof(info->driver) - 1] = '\0';
[...]
Use strlcpy() instead of these two statements.
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: [PATCH 3/3] at76c50x-usb: set firmware and hardware version in wiphy
From: Ben Hutchings @ 2009-10-01 1:32 UTC (permalink / raw)
To: John W. Linville
Cc: linux-wireless, netdev, Kalle Valo, Kalle Valo, Luis R. Rodriguez
In-Reply-To: <1254359942-3483-3-git-send-email-linville@tuxdriver.com>
On Wed, 2009-09-30 at 21:19 -0400, John W. Linville wrote:
[...]
> + len = sizeof(wiphy->fw_version);
> + snprintf(wiphy->fw_version, len, "%d.%d.%d-%d",
> + priv->fw_version.major, priv->fw_version.minor,
> + priv->fw_version.patch, priv->fw_version.build);
> + /* null terminate the strings in case they were truncated */
> + wiphy->fw_version[len - 1] = '\0';
[...]
This last statement is unnecessary; snprintf() always null-terminates
(unless the length is zero).
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply
* Re: [PATCH 2.6.32-rc1] net: VMware virtual Ethernet NIC driver: vmxnet3
From: David Miller @ 2009-10-01 2:51 UTC (permalink / raw)
To: shemminger
Cc: sbhatewara, linux-kernel, netdev, shemminger, jgarzik, anthony,
chrisw, greg, akpm, virtualization, pv-drivers
In-Reply-To: <20090930173923.4520716a@s6510>
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 30 Sep 2009 17:39:23 -0700
> Why not use NETIF_F_LRO and ethtool to control LRO support?
In fact, you must, in order to handle bridging and routing
correctly.
Bridging and routing is illegal with LRO enabled, so the kernel
automatically issues the necessary ethtool commands to disable
LRO in the relevant devices.
Therefore you must support the ethtool LRO operation in order to
support LRO at all.
^ permalink raw reply
* Re: [net-2.6 PATCH 1/5] ixgbe: Fix disabling of relaxed ordering with Tx DCA
From: David Miller @ 2009-10-01 3:04 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, peter.p.waskiewicz.jr
In-Reply-To: <20090930220705.27479.62694.stgit@localhost.localdomain>
All 5 patches applied, thanks!
^ permalink raw reply
* Re: [net-2.6 PATCH 0/5] qlge: Bug fixes for qlge.
From: David Miller @ 2009-10-01 3:04 UTC (permalink / raw)
To: ron.mercer; +Cc: netdev
In-Reply-To: <1254249565-16381-1-git-send-email-ron.mercer@qlogic.com>
All applied, thanks Ron.
^ permalink raw reply
* Re: [PATCH] skge: Make sure both ports initialize correctly
From: David Miller @ 2009-10-01 3:04 UTC (permalink / raw)
To: shemminger; +Cc: mikem, shemminger, netdev
In-Reply-To: <20090930172821.7c6bd127@s6510>
From: Stephen Hemminger <shemminger@vyatta.com>
Date: Wed, 30 Sep 2009 17:28:21 -0700
> On Wed, 23 Sep 2009 22:50:36 +0900
> Mike McCormack <mikem@ring3k.org> wrote:
>
>> If allocation of the second ports fails, make sure that hw->ports
>> is not 2 otherwise we'll crash trying to access the second port.
>>
>> This fix is copied from a similar fix in the sky2 driver (ca519274...),
>> but is untested, as I don't have a skge card.
>>
>> Signed-off-by: Mike McCormack <mikem@ring3k.org>
...
> Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Applied.
^ permalink raw reply
* Re: [PATCH 2.6.31-rc9] drivers/net: ks8851_mll ethernet network driver
From: David Miller @ 2009-10-01 3:05 UTC (permalink / raw)
To: David.Choi; +Cc: greg, netdev, Charles.Li, Choi, jgarzik, shemminger
In-Reply-To: <C43529A246480145B0A6D0234BDB0F0D021280@MELANITE.micrel.com>
From: "Choi, David" <David.Choi@Micrel.Com>
Date: Fri, 25 Sep 2009 17:42:12 -0700
> Hello David Miller,
>
> First of all, thank you for your feedback. Here is my new patch.
>
>>From : David J. Choi <david.choi@micrel.com>
>
> This is the first registration of ks8851 network driver with
> MLL(address/data multiplexed) interface.
>
> Signed-off-by : David J. Choi <david.choi@micrel.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] bcm63xx_enet: timeout off by one in do_mdio_op()
From: David Miller @ 2009-10-01 3:05 UTC (permalink / raw)
To: mbizon; +Cc: roel.kluin, netdev, akpm
In-Reply-To: <1254319288.1627.758.camel@sakura.staff.proxad.net>
From: Maxime Bizon <mbizon@freebox.fr>
Date: Wed, 30 Sep 2009 16:01:28 +0200
>
> On Mon, 2009-09-21 at 22:08 +0200, Roel Kluin wrote:
>
> Hi Roel,
>
>> `while (limit-- >= 0)' reaches -2 after the loop upon timeout.
>
> The 1000us limit was chosen arbitrarily, since mdio access are much
> shorter, and was just to prevent CPU lockup in case of hardware bug.
>
> But it looks like a bug, and since you're the second one reporting this,
> this should be fixed :)
>
>
>> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
>
> Acked-by: Maxime Bizon <mbizon@freebox.fr>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] 3c59x: Rework suspend and resume
From: David Miller @ 2009-10-01 3:11 UTC (permalink / raw)
To: rjw; +Cc: avorontsov, stern, linux-pm, netdev
In-Reply-To: <200909252354.34511.rjw@sisk.pl>
From: "Rafael J. Wysocki" <rjw@sisk.pl>
Date: Fri, 25 Sep 2009 23:54:34 +0200
> On Friday 25 September 2009, Anton Vorontsov wrote:
>> As noticed by Alan Stern, there is still one issue with the driver:
>> we disable PCI IRQ on suspend, but other devices on the same IRQ
>> line might still need the IRQ enabled to suspend properly.
>>
>> Nowadays, PCI core handles all power management work by itself, with
>> one condition though: if we use dev_pm_ops. So, rework the driver to
>> only quiesce 3c59x internal logic on suspend, while PCI core will
>> manage PCI device power state with IRQs disabled.
>>
>> Suggested-by: Rafael J. Wysocki <rjw@sisk.pl>
>
> Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Applied, thanks everyone.
^ permalink raw reply
* [PATCH] be2net: Workaround to fix a bug in Rx Completion processing.
From: Ajit Khaparde @ 2009-10-01 4:03 UTC (permalink / raw)
To: davem, netdev
vtp bit in RX completion descriptor could be wrongly set in
some skews of BladEngine. Ignore this bit if vtm is not set.
Resending because the previous patch was against net-next tree.
This patch is against the net-2.6 tree.
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
---
drivers/net/benet/be.h | 1 +
drivers/net/benet/be_cmds.c | 3 ++-
drivers/net/benet/be_cmds.h | 3 ++-
drivers/net/benet/be_main.c | 23 +++++++++++++++++++----
4 files changed, 24 insertions(+), 6 deletions(-)
diff --git a/drivers/net/benet/be.h b/drivers/net/benet/be.h
index 684c6fe..a80da0e 100644
--- a/drivers/net/benet/be.h
+++ b/drivers/net/benet/be.h
@@ -258,6 +258,7 @@ struct be_adapter {
bool link_up;
u32 port_num;
bool promiscuous;
+ u32 cap;
};
extern const struct ethtool_ops be_ethtool_ops;
diff --git a/drivers/net/benet/be_cmds.c b/drivers/net/benet/be_cmds.c
index 3dd76c4..79d35d1 100644
--- a/drivers/net/benet/be_cmds.c
+++ b/drivers/net/benet/be_cmds.c
@@ -1068,7 +1068,7 @@ int be_cmd_get_flow_control(struct be_adapter *adapter, u32 *tx_fc, u32 *rx_fc)
}
/* Uses mbox */
-int be_cmd_query_fw_cfg(struct be_adapter *adapter, u32 *port_num)
+int be_cmd_query_fw_cfg(struct be_adapter *adapter, u32 *port_num, u32 *cap)
{
struct be_mcc_wrb *wrb;
struct be_cmd_req_query_fw_cfg *req;
@@ -1088,6 +1088,7 @@ int be_cmd_query_fw_cfg(struct be_adapter *adapter, u32 *port_num)
if (!status) {
struct be_cmd_resp_query_fw_cfg *resp = embedded_payload(wrb);
*port_num = le32_to_cpu(resp->phys_port);
+ *cap = le32_to_cpu(resp->function_cap);
}
spin_unlock(&adapter->mbox_lock);
diff --git a/drivers/net/benet/be_cmds.h b/drivers/net/benet/be_cmds.h
index 93e432f..8b4c2cb 100644
--- a/drivers/net/benet/be_cmds.h
+++ b/drivers/net/benet/be_cmds.h
@@ -760,7 +760,8 @@ extern int be_cmd_set_flow_control(struct be_adapter *adapter,
u32 tx_fc, u32 rx_fc);
extern int be_cmd_get_flow_control(struct be_adapter *adapter,
u32 *tx_fc, u32 *rx_fc);
-extern int be_cmd_query_fw_cfg(struct be_adapter *adapter, u32 *port_num);
+extern int be_cmd_query_fw_cfg(struct be_adapter *adapter,
+ u32 *port_num, u32 *cap);
extern int be_cmd_reset_function(struct be_adapter *adapter);
extern int be_process_mcc(struct be_adapter *adapter);
extern int be_cmd_write_flashrom(struct be_adapter *adapter,
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c
index 409cf05..2f9b501 100644
--- a/drivers/net/benet/be_main.c
+++ b/drivers/net/benet/be_main.c
@@ -747,9 +747,16 @@ static void be_rx_compl_process(struct be_adapter *adapter,
struct be_eth_rx_compl *rxcp)
{
struct sk_buff *skb;
- u32 vtp, vid;
+ u32 vlanf, vid;
+ u8 vtm;
- vtp = AMAP_GET_BITS(struct amap_eth_rx_compl, vtp, rxcp);
+ vlanf = AMAP_GET_BITS(struct amap_eth_rx_compl, vtp, rxcp);
+ vtm = AMAP_GET_BITS(struct amap_eth_rx_compl, vtm, rxcp);
+
+ /* vlanf could be wrongly set in some cards.
+ * ignore if vtm is not set */
+ if ((adapter->cap == 0x400) && !vtm)
+ vlanf = 0;
skb = netdev_alloc_skb(adapter->netdev, BE_HDR_LEN + NET_IP_ALIGN);
if (!skb) {
@@ -772,7 +779,7 @@ static void be_rx_compl_process(struct be_adapter *adapter,
skb->protocol = eth_type_trans(skb, adapter->netdev);
skb->dev = adapter->netdev;
- if (vtp) {
+ if (vlanf) {
if (!adapter->vlan_grp || adapter->num_vlans == 0) {
kfree_skb(skb);
return;
@@ -797,11 +804,18 @@ static void be_rx_compl_process_gro(struct be_adapter *adapter,
struct be_eq_obj *eq_obj = &adapter->rx_eq;
u32 num_rcvd, pkt_size, remaining, vlanf, curr_frag_len;
u16 i, rxq_idx = 0, vid, j;
+ u8 vtm;
num_rcvd = AMAP_GET_BITS(struct amap_eth_rx_compl, numfrags, rxcp);
pkt_size = AMAP_GET_BITS(struct amap_eth_rx_compl, pktsize, rxcp);
vlanf = AMAP_GET_BITS(struct amap_eth_rx_compl, vtp, rxcp);
rxq_idx = AMAP_GET_BITS(struct amap_eth_rx_compl, fragndx, rxcp);
+ vtm = AMAP_GET_BITS(struct amap_eth_rx_compl, vtm, rxcp);
+
+ /* vlanf could be wrongly set in some cards.
+ * ignore if vtm is not set */
+ if ((adapter->cap == 0x400) && !vtm)
+ vlanf = 0;
skb = napi_get_frags(&eq_obj->napi);
if (!skb) {
@@ -2045,7 +2059,8 @@ static int be_hw_up(struct be_adapter *adapter)
if (status)
return status;
- status = be_cmd_query_fw_cfg(adapter, &adapter->port_num);
+ status = be_cmd_query_fw_cfg(adapter,
+ &adapter->port_num, &adapter->cap);
return status;
}
--
1.6.0.4
^ permalink raw reply related
* Re: [PATCH] be2net: Workaround to fix a bug in Rx Completion processing.
From: David Miller @ 2009-10-01 4:58 UTC (permalink / raw)
To: ajitk; +Cc: netdev
In-Reply-To: <20091001040247.GA28228@serverengines.com>
From: Ajit Khaparde <ajitk@serverengines.com>
Date: Thu, 1 Oct 2009 09:33:22 +0530
> vtp bit in RX completion descriptor could be wrongly set in
> some skews of BladEngine. Ignore this bit if vtm is not set.
> Resending because the previous patch was against net-next tree.
> This patch is against the net-2.6 tree.
>
> Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Applied, thanks.
^ permalink raw reply
* Re: kernel doc / docbook pdfdocs question
From: Doug Maxey @ 2009-10-01 5:42 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: Randy Dunlap, netdev
In-Reply-To: <20090930173002.36da7ffd@s6510>
On Wed, 30 Sep 2009 17:30:02 PDT, Stephen Hemminger wrote:
>On Wed, 30 Sep 2009 14:59:36 -0500
>Doug Maxey <dwm@enoyolf.org> wrote:
>
>>
>> Randy,
>>
>> This may be slightly off topic for this list, but it does involve an
>> (as yet un-released) network driver. :)
>>
>> Do you have any insight that could guide me toward a fix for an issue
>> seen with some header file constructs when trying to generate a pdf
>> docbook?
>>
>
>Why clutter docbook output (which is supposed to be about general kernel
>API's) with output for data structures in one driver.
It would be a general mechanism, and it would be to document an API.
There are other subsystems that use DECLARE_BITMAP() (e.g., scsi).
Just none at the moment that attempt to describe such a member,
possibly because there isn't a way to document it. Dunno. Build it
and they will come. There is one party that is interested anyway.
Finally did find where this was getting warned about / tossed, in
kernel-doc itself. =)
++doug
^ permalink raw reply
* Re: [PATCH] ethtool: Add a new ethtool option to flash a firmware image from the specified file to a device.
From: Ajit Khaparde @ 2009-10-01 6:13 UTC (permalink / raw)
To: davem, jgarzik; +Cc: netdev
In-Reply-To: <20090903030258.GA19401@serverengines.com>
On 03/09/09 08:33 +0530, Ajit Khaparde wrote:
> This patch adds a new "-f" option to the ethtool utility
> to flash a firmware image specified by a file, to a network device.
> The filename is passed to the network driver which will flash the image
> on the chip using the request_firmware path.
>
> The region "on the chip" to be flashed can be specified by an option.
> It is upto the device driver to enumerate the region number passed by ethtool,
> to the region to be flashed.
>
> The default behavior is to flash all the regions on the chip.
>
> Usage:
> ethtool -f <interface name> <filename of firmware image>
>
> ethtool -f <interface name> <filename of firmware image> [ REGION-NUMBER-TO-FLASH ]
>
> Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
When will this change make it to the ethtool source?
Anything that I need to do from my side?
I hope this is the right place to submit such changes.
Thanks
-Ajit
^ permalink raw reply
* [net-2.6 PATCH] ixgbe: correct the parameter description
From: Jeff Kirsher @ 2009-10-01 6:51 UTC (permalink / raw)
To: davem; +Cc: netdev, gospo, Jiri Pirko, Peter P Waskiewicz Jr, Jeff Kirsher
From: Jiri Pirko <jpirko@redhat.com>
ccffad25b5136958d4769ed6de5e87992dd9c65c changed parameters for function
ixgbe_update_uc_addr_list_generic but parameter description was not updated.
This patch corrects it.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_common.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_common.c b/drivers/net/ixgbe/ixgbe_common.c
index 143b0fc..40ff120 100644
--- a/drivers/net/ixgbe/ixgbe_common.c
+++ b/drivers/net/ixgbe/ixgbe_common.c
@@ -1355,9 +1355,7 @@ static void ixgbe_add_uc_addr(struct ixgbe_hw *hw, u8 *addr, u32 vmdq)
/**
* ixgbe_update_uc_addr_list_generic - Updates MAC list of secondary addresses
* @hw: pointer to hardware structure
- * @addr_list: the list of new addresses
- * @addr_count: number of addresses
- * @next: iterator function to walk the address list
+ * @uc_list: the list of new addresses
*
* The given list replaces any existing list. Clears the secondary addrs from
* receive address registers. Uses unused receive address registers for the
^ permalink raw reply related
* Re: [PATCH] net: fix NOHZ: local_softirq_pending 08
From: Oliver Hartkopp @ 2009-10-01 7:08 UTC (permalink / raw)
To: David Miller; +Cc: johannes, mb, kalle.valo, linville, linux-wireless, netdev
In-Reply-To: <20090930.163333.234658158.davem@davemloft.net>
David Miller wrote:
> From: Oliver Hartkopp <oliver@hartkopp.net>
> Date: Wed, 30 Sep 2009 20:18:25 +0200
>
>> Socket buffers that are generated and received inside softirqs or from process
>> context must not use netif_rx() that's intended to be used from irq context only.
>>
>> This patch introduces a new helper function netif_rx_ti(skb) that tests for
>> in_interrupt() before invoking netif_rx() or netif_rx_ni().
>>
>> It fixes the ratelimited kernel warning
>>
>> NOHZ: local_softirq_pending 08
>>
>> in the mac80211 and can subsystems.
>>
>> Signed-off-by: Oliver Hartkopp <oliver@hartkopp.net>
>
> I bet all of these code paths can use netif_receive_skb() or
> don't need this conditional blob at all.
>
> Looking at some specific cases in this patch:
>
> 1) VCAN: This RX routine is only invoked from the drivers
> ->ndo_start_xmit() handler, and therefore like the loopback
> driver we know that BH's are already disabled and therefore
> it can always use netif_rx() safely.
>
> Why did you convert this case?
>
> And if this needs to be converted, why doesn't loopback need
> to be?
>
> 2) af_can.c: In what situation will netif_rx_ni() not be appropriate
> here? It should always execute in softirq or user context, now
> hardirq context.
>
> And the list goes on and on, I don't really like this new conditional
> testing of interrupt state.
Hello Dave,
i'm confused about in_interrupt(), in_softirq() and in_irq() as pointed out by
Johannes here:
http://marc.info/?l=linux-wireless&m=125432410405562&w=2
Indeed in the two cases for the CAN stuff (in vcan.c and af_can.c) the skb's
are received in process-context and softirq-context only.
Therefore i used netif_rx_ni() in my last change of this code.
Now i was reading from Johannes that in_interrupt() is used for
hardirq-context /and/ softirq-context, so i was just *unsure* and used the
newly introduced netif_rx_ti() for that, which tests for in_interrupt().
Indeed i'm not really happy with that, as it is always better to check each
receive case in which context it can be used and used exactly the right
function for that.
So when netif_rx_ni() or netif_receive_skb() is the best i can use when in
process-context or in softirq-context, i'll do it with pleasure.
And if it is like this the problematic netif_rx() calls in mac80211 need to be
sorted out in detail also ...
Regards,
Oliver
^ permalink raw reply
* Re: [PATCH] connector: Allow permission checking in the receiver callbacks
From: Lars Ellenberg @ 2009-10-01 8:01 UTC (permalink / raw)
To: Evgeniy Polyakov; +Cc: Philipp Reisner, linux-kernel, netdev, Andrew Morton
In-Reply-To: <20090930192928.GA1315@ioremap.net>
On Wed, Sep 30, 2009 at 11:29:28PM +0400, Evgeniy Polyakov wrote:
> On Wed, Sep 30, 2009 at 03:20:35PM +0200, Lars Ellenberg (lars.ellenberg@linbit.com) wrote:
> > Actually it is the basis for follow-up security fixes.
> >
> > Without this, unprivileged user space is able to send arbitrary
> > connector requests to kernel subsystems, which have no way to verify the
> > privileges of the sender anymore, because that information, even though
> > available at the netlink layer, has been dropped by the connector.
>
> It is not. One can add some checks at receiving time which happens in
> process context to get its credentials, but nothing in netlink itself
> carry this info. Getting that connector schedules workqueue this ability
> is lost.
Please correct me if I'm wrong.
My understanding is, that in netlink_sendmsg, the credentials and
capabilities are copied into skb->cb.
During kernel side receive, these can be checked.
If we pass the skb, instead of just the msg, then even an asynchronously
scheduled receive callback, running in any workqueue or other context,
can check for these credentials.
Passing skb instead of just the msg for use in cn_queue_wrapper
is what the fist patch does.
Second patch changes the semantics of the actual callback
to be passed in the msg _and_ the netlink_skb_parms, both
"reconstructed" from the skb.
Now, in the end-user callback, there is the actual msg,
but also the netlink_skb_parms.
So this enables the end-user callback, running in arbitrary context,
to check capabilities and other credentials of the sending process.
> > Once this is applied, the various in-kernel receiving connector
> > callbacks can (and need to) add cap_raised(nsb->eff_cap, cap) where
> > appropriate. For example, you don't want some guest user to be able to
> > trigger a dst_del_node callback by sending a crafted netlink message,
> > right?
> >
> > So it _is_ a (design-) bug fix.
> > Or am I missing something?
>
> This patchset is not a bugfix, just a cleanup, since none in patchset
> uses netlink_skb_parms
3. and 4. patch are in fact merely cleanups.
> and currently I see no users which are affected
> by this behaviour in the mainline branch (not counting staging tree).
>
> But if proposed configuration changes for DM are on the way, then I
> agree and they should force this patchset into the tree as a bugfix.
>
> --
> Evgeniy Polyakov
>
--
: Lars Ellenberg
: LINBIT | Your Way to High Availability
: DRBD/HA support and consulting http://www.linbit.com
DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
^ permalink raw reply
* Re: [net-2.6 PATCH] ixgbe: correct the parameter description
From: David Miller @ 2009-10-01 8:10 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, gospo, jpirko, peter.p.waskiewicz.jr
In-Reply-To: <20091001065140.13279.42634.stgit@localhost.localdomain>
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 30 Sep 2009 23:51:41 -0700
> From: Jiri Pirko <jpirko@redhat.com>
>
> ccffad25b5136958d4769ed6de5e87992dd9c65c changed parameters for function
> ixgbe_update_uc_addr_list_generic but parameter description was not updated.
> This patch corrects it.
>
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
> Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied, thanks.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox