* Re: [RFC net-next PATCH 2/4] ixgbe: Reconfigure SR-IOV Init
From: David Miller @ 2011-07-28 5:26 UTC (permalink / raw)
To: gregory.v.rose; +Cc: netdev, bhutchings, jeffrey.t.kirsher
In-Reply-To: <20110727221754.8435.99712.stgit@gitlad.jf.intel.com>
From: Greg Rose <gregory.v.rose@intel.com>
Date: Wed, 27 Jul 2011 15:17:54 -0700
> + int i;
> + for (i = 0; i < adapter->num_vfs; i++) {
> + if (adapter->vfinfo[i].vfdev->dev_flags &
> + PCI_DEV_FLAGS_ASSIGNED) {
> + return true;
> + }
> + }
Bad formatting and indentation, please fix this.
> + pvfdev = pci_get_device(IXGBE_INTEL_VENDOR_ID, device_id, NULL);
> + while (pvfdev) {
> + if (pvfdev->devfn == thisvf_devfn)
> + break;
> + pvfdev = pci_get_device(IXGBE_INTEL_VENDOR_ID,
> + device_id, pvfdev);
> + }
> + if (pvfdev)
> + adapter->vfinfo[vfn].vfdev = pvfdev;
pci_get_*() grabs a reference to any non-NULL pci device object
returned, where does this reference get released? I scanned
all uses of x.vfdev and x->vfdev and could not find the necessary
release.
^ permalink raw reply
* Re: [RFC net-next PATCH 3/4] ethtool: Add new set commands
From: David Miller @ 2011-07-28 5:27 UTC (permalink / raw)
To: gregory.v.rose; +Cc: netdev, bhutchings, jeffrey.t.kirsher
In-Reply-To: <20110727221759.8435.11589.stgit@gitlad.jf.intel.com>
From: Greg Rose <gregory.v.rose@intel.com>
Date: Wed, 27 Jul 2011 15:17:59 -0700
> Add new set commands to configure the number of SR-IOV VFs, the
> number of VM queues and spoof checking on/off switch.
>
> Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
> ---
>
> include/linux/ethtool.h | 11 ++++++++++-
> 1 files changed, 10 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
> index c6e427a..c4972ba 100644
> --- a/include/linux/ethtool.h
> +++ b/include/linux/ethtool.h
> @@ -36,12 +36,14 @@ struct ethtool_cmd {
> __u8 mdio_support;
> __u32 maxtxpkt; /* Tx pkts before generating tx int */
> __u32 maxrxpkt; /* Rx pkts before generating rx int */
> + __u32 num_vfs; /* Enable SR-IOV VFs */
> + __u32 num_vmqs; /* Set number of queues for VMDq */
You can't change the layout of this datastructure in this way without
breaking every ethtool binary out there.
You have to find another place to add these knobs.
^ permalink raw reply
* Re: [PATCH 0/8] bna: Driver Fixes and Support for Re-architecture
From: David Miller @ 2011-07-28 5:32 UTC (permalink / raw)
To: rmody; +Cc: netdev, adapter_linux_open_src_team
In-Reply-To: <1311732648-29876-1-git-send-email-rmody@brocade.com>
From: Rasesh Mody <rmody@brocade.com>
Date: Tue, 26 Jul 2011 19:10:40 -0700
> This patch-set consists of few fixes, HW reg consolidation and adds support
> for re-architecture and re-organisation of the driver.
Please do not mix bug fixes and feature changes.
If you do this, I can't put the bug fixes into the current release.
Seperate out the real pure bug fixes into a seperate series against
the main 'net' GIT tree.
Then you can submit your feature changes and cleanups seperately for
'net-next'
^ permalink raw reply
* Could I export the udp socket security contexts to /proc/net/udp
From: Rongqing Li @ 2011-07-28 5:38 UTC (permalink / raw)
To: netdev
Hi Linux-netdev folks:
Could I export the socket security contexts to udp, tcp, raw,
unix file under /proc/net/?
If can not, Could you tell me where and how I should export this
information to?
The element sk_security of struct sock represents the socket
security context ID, which is inheriting from the process which
creates this socket most of the time.
but when SELinux type_transition rule is applied to socket, or
application sets /proc/xxx/attr/createsock, the socket security
context would be different from the creating process. on this
condition, the "netstat -Z" will return wrong value, since
"netstat -Z" only returns the process security context as socket
process security.
I want to fix "netstat -Z", but first the kernel must export this
information, like /proc/xxx/attr/current is the process security
context. So I have this requirement.
Expect your instruction.
Thanks.
--
Best Reagrds,
Roy | RongQing Li
-------------------------------------------------------------
WIND RIVER Beijing | China Development Center
Phone: +86-10-6483-5025, Cell: +86-135-2202-9864, Fax: +86-10-6479-0367
^ permalink raw reply
* Re: [PATCH net-next 0/9] tg3: Add 4k workaround for 5719
From: David Miller @ 2011-07-28 5:39 UTC (permalink / raw)
To: mcarlson; +Cc: netdev
In-Reply-To: <1311812454-18197-1-git-send-email-mcarlson@broadcom.com>
From: "Matt Carlson" <mcarlson@broadcom.com>
Date: Wed, 27 Jul 2011 17:20:45 -0700
> This patchset adds a necessary 4k RDMA limit workaround for 5719 devices.
Series applied, thanks Matt.
^ permalink raw reply
* Re: [PATCH 1/2] ASIX: Simplify condition in rx_fixup()
From: David Miller @ 2011-07-28 5:40 UTC (permalink / raw)
To: marek.vasut; +Cc: linux-kernel, netdev, linux-usb, gregkh
In-Reply-To: <1311734687-23551-1-git-send-email-marek.vasut@gmail.com>
From: Marek Vasut <marek.vasut@gmail.com>
Date: Wed, 27 Jul 2011 04:44:46 +0200
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH 2/2] ASIX: Use only 11 bits of header for data size
From: David Miller @ 2011-07-28 5:40 UTC (permalink / raw)
To: marek.vasut; +Cc: linux-kernel, netdev, linux-usb, gregkh
In-Reply-To: <1311734687-23551-2-git-send-email-marek.vasut@gmail.com>
From: Marek Vasut <marek.vasut@gmail.com>
Date: Wed, 27 Jul 2011 04:44:47 +0200
> The AX88772B uses only 11 bits of the header for the actual size. The other bits
> are used for something else. This causes dmesg full of messages:
>
> asix_rx_fixup() Bad Header Length
>
> This patch trims the check to only 11 bits. I believe on older chips, the
> remaining 5 top bits are unused.
>
> Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH] Fix cdc-phonet build
From: David Miller @ 2011-07-28 5:41 UTC (permalink / raw)
To: chris2553; +Cc: netdev
In-Reply-To: <201107262320.22338.chris2553@googlemail.com>
From: Chris Clayton <chris2553@googlemail.com>
Date: Tue, 26 Jul 2011 23:20:22 +0100
> cdc-phonet does not presently build on linux-3.0 because there is no entry for it in
> drivers/net/Makefile. This patch adds that entry.
>
> Signed-off-by: Chris Clayton <chris2553@googlemail.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next v3] bonding: fix string comparison errors
From: David Miller @ 2011-07-28 5:41 UTC (permalink / raw)
To: andy; +Cc: netdev, vitas, fubar, tumeya
In-Reply-To: <1311714747-9407-1-git-send-email-andy@greyhouse.net>
From: Andy Gospodarek <andy@greyhouse.net>
Date: Tue, 26 Jul 2011 17:12:27 -0400
> When a bond contains a device where one name is the subset of another
> (eth1 and eth10, for example), one cannot properly set the primary
> device or the currently active device.
>
> This was reported and based on work by Takuma Umeya. I also verified
> the problem and tested that this fix resolves it.
>
> V2: A few did not like the the current code or my changes, so I
> refactored bonding_store_primary and bonding_store_active_slave to be a
> bit cleaner, dropped the use of strnicmp since we did not really need
> the comparison to be case insensitive, and formatted the input string
> from sysfs so a comparison to IFNAMSIZ could be used.
>
> I also discovered an error in bonding_store_active_slave that would
> modify bond->primary_slave rather than bond->curr_active_slave before
> forcing the bonding driver to choose a new active slave.
>
> V3: Actually sending the proper patch....
>
> Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
> Reported-by: Takuma Umeya <tumeya@redhat.com>
Applied.
^ permalink raw reply
* Re: [patch net-next-2.6 V2] forcedeth: fix vlans
From: David Miller @ 2011-07-28 5:41 UTC (permalink / raw)
To: jpirko; +Cc: mirqus, jesse, netdev, johnstul, w41ter
In-Reply-To: <20110726201927.GD2475@minipsycho>
From: Jiri Pirko <jpirko@redhat.com>
Date: Tue, 26 Jul 2011 22:19:28 +0200
> For some reason, when rxaccel is disabled, NV_RX3_VLAN_TAG_PRESENT is
> still set and some pseudorandom vids appear. So check for
> NETIF_F_HW_VLAN_RX as well. Also set correctly hw_features and set vlan
> mode on probe.
>
> Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Applied.
^ permalink raw reply
* Re: [PATCH net-next-2.6 v2] bonding: reduce noise during init
From: David Miller @ 2011-07-28 5:40 UTC (permalink / raw)
To: andy; +Cc: joe, fubar, netdev
In-Reply-To: <20110727200926.GS21309@gospo.rdu.redhat.com>
From: Andy Gospodarek <andy@greyhouse.net>
Date: Wed, 27 Jul 2011 16:09:26 -0400
> Subject: [PATCH net-next-2.6 v2] bonding: reduce noise during init
>
> Many are using sysfs to configure bonding rather than module options, so
> there is no need for bonding to throw this warning in normal cases.
>
> Keep the message around when debugging is enabled as it might be useful
> for someone desperate enough to enable debugging, but eliminate it
> otherwise.
>
> Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Applied.
^ permalink raw reply
* Re: invalid requirement from ethtool?
From: David Miller @ 2011-07-28 5:43 UTC (permalink / raw)
To: eli; +Cc: netdev
In-Reply-To: <20110726124222.GA4842@mtldesk30>
From: Eli Cohen <eli@dev.mellanox.co.il>
Date: Tue, 26 Jul 2011 15:42:22 +0300
> I think both params zero should be allowed and mean coalescing is not
> operational, thus we can remove these comments from ethtool.h
The existing precendence has existed for more than 10 years. You can't
just change it like this.
You'll need to find a new way to encode "disabled" coalescing.
^ permalink raw reply
* Re: [PATCH 1/2] net: add IFF_SKB_TX_SHARED flag to priv_flags
From: David Miller @ 2011-07-28 5:42 UTC (permalink / raw)
To: nhorman; +Cc: netdev, robert.olsson, eric.dumazet, adobriyan
In-Reply-To: <1311696338-4739-2-git-send-email-nhorman@tuxdriver.com>
From: Neil Horman <nhorman@tuxdriver.com>
Date: Tue, 26 Jul 2011 12:05:37 -0400
> Pktgen attempts to transmit shared skbs to net devices, which can't be used by
> some drivers as they keep state information in skbs. This patch adds a flag
> marking drivers as being able to handle shared skbs in their tx path. Drivers
> are defaulted to being unable to do so, but calling ether_setup enables this
> flag, as 90% of the drivers calling ether_setup touch real hardware and can
> handle shared skbs. A subsequent patch will audit drivers to ensure that the
> flag is set properly
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> Reported-by: Jiri Pirko <jpirko@redhat.com>
Applied.
^ permalink raw reply
* Re: [PATCH] net: sock_sendmsg_nosec() is static
From: David Miller @ 2011-07-28 5:43 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev, anton
In-Reply-To: <1311683981.2355.29.camel@edumazet-HP-Compaq-6005-Pro-SFF-PC>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Tue, 26 Jul 2011 14:39:41 +0200
> Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Applied.
^ permalink raw reply
* Re: [PATCH] gianfar: fix bug caused by 87c288c6e9aa31720b72e2bc2d665e24e1653c3e
From: David Miller @ 2011-07-28 5:43 UTC (permalink / raw)
To: sebastian.belden; +Cc: netdev, jpirko
In-Reply-To: <1311674593.17190.7.camel@DENEC1DT0191>
From: "Sebastian Pöhn" <sebastian.belden@googlemail.com>
Date: Tue, 26 Jul 2011 12:03:13 +0200
> commit 87c288c6e9aa31720b72e2bc2d665e24e1653c3e "gianfar: do vlan cleanup" has two issues:
> # permutation of rx and tx flags
> # enabling vlan tag insertion by default (this leads to unusable connections on some configurations)
>
> If VLAN insertion is requested (via ethtool) it will be set at an other point ...
>
> Signed-off-by: Sebastian Poehn <sebastian.poehn@belden.com>
Applied.
^ permalink raw reply
* Re: [PATCH 2/2] net: Audit drivers to identify those needing IFF_TX_SKB_SHARING cleared
From: David Miller @ 2011-07-28 5:42 UTC (permalink / raw)
To: nhorman
Cc: netdev, isdn, fubar, andy, kaber, khc, linville, gregkh, marcel,
johannes
In-Reply-To: <1311696338-4739-3-git-send-email-nhorman@tuxdriver.com>
From: Neil Horman <nhorman@tuxdriver.com>
Date: Tue, 26 Jul 2011 12:05:38 -0400
> After the last patch, We are left in a state in which only drivers calling
> ether_setup have IFF_TX_SKB_SHARING set (we assume that drivers touching real
> hardware call ether_setup for their net_devices and don't hold any state in
> their skbs. There are a handful of drivers that violate this assumption of
> course, and need to be fixed up. This patch identifies those drivers, and marks
> them as not being able to support the safe transmission of skbs by clearning the
> IFF_TX_SKB_SHARING flag in priv_flags
>
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Applied.
^ permalink raw reply
* Re: [PATCH 2/2] ASIX: Use only 11 bits of header for data size
From: Marek Vasut @ 2011-07-28 6:06 UTC (permalink / raw)
To: David Miller
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, linux-usb-u79uwXL29TY76Z2rM5mHXA,
gregkh-l3A5Bk7waGM
In-Reply-To: <20110727.224029.619127041796367339.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
On Thursday, July 28, 2011 07:40:29 AM David Miller wrote:
> From: Marek Vasut <marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Date: Wed, 27 Jul 2011 04:44:47 +0200
>
> > The AX88772B uses only 11 bits of the header for the actual size. The
> > other bits
> >
> > are used for something else. This causes dmesg full of messages:
> > asix_rx_fixup() Bad Header Length
> >
> > This patch trims the check to only 11 bits. I believe on older chips, the
> > remaining 5 top bits are unused.
> >
> > Signed-off-by: Marek Vasut <marek.vasut-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>
> Applied.
Hi, did you test it ?
I left NOTEs outside the commit message:
NOTE: If possible, can someone test/verify this patch with other ASIX chips ?
NOTE2: If Ack-ed, Greg, can you get this into -stable?
I hope I won't have a horde of angry people at my door soon ;-)
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" 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
* Re: Realtek 8139 Flow Control?
From: Francois Romieu @ 2011-07-28 6:35 UTC (permalink / raw)
To: Sven Anders; +Cc: netdev, jgarzik
In-Reply-To: <4E3004BD.4090705@anduras.de>
Sven Anders <anders@anduras.de> :
> Sven Anders wrote:
[...]
> > We have appliances with Realtek 8139C/8139C+ (rev 10) chipsets (with the
> > PCI IDs: 10ec:8139). We are using the 8139too driver (version: 0.9.28)
The PCI revision ID is not incompatible with a 8139c(l)+. If so the 8139cp
driver may prove easier to handle at the driver programming level. It's
almost surely less commonly used though.
I'd suggest to use both PCI information and TxConfig content to identify
Realtek's chipset. ethtool should provide the latter.
> > According the datasheet the chipset supports Flow Control (IEEE 802.3x).
> >
> > I want to know, if the support for enabling flow control is missing in
> > the driver by purpose or is only not implemented due to lack of time?
[...]
> Can somebody of the old implementors please answer this question?
Hint ? :o)
This hardware is not exactly fun, especially if you do not own a c+ model
(4 Tx descriptors, a single copy-only receive buffer, really cheap...).
> We need that feature and I'm willing to implement it, but I need the
> confirmation, that it was not done due to lack of time and not because
> will not work (correctly)...
If you do not get an answer and the relevant bit is already set in the
eeprom, you should be able to make your own mind shortly. The comment
in the datasheet rightfully reminds that both the NIC and the peer
networking gear need to handle flow control correctly.
Good luck.
--
Ueimor
^ permalink raw reply
* Re: Oops when insmod rtl8192ce
From: hubert Liao @ 2011-07-28 7:06 UTC (permalink / raw)
To: John W. Linville
Cc: wlanfae, Larry Finger, Chaoming Li, linux-wireless, netdev,
linux-kernel
In-Reply-To: <20110727135353.GA16431@tuxdriver.com>
2011/7/27 John W. Linville <linville@tuxdriver.com>:
> On Wed, Jul 27, 2011 at 05:20:15PM +0800, hubert Liao wrote:
>> Hi,
>>
>> We got an oops when insmod rtl8192ce module (the board is an ARM soc),
>> accroding the oops message, find it's because in rtl_pci_probe() called
>> _rtl_pci_find_adapter(),
>> in this funcation, the pdev->bus->self is a NULL pointer .
>>
>> static boot _rtl_pci_find_adapter(strcut pci_dev *dev,
>> struct ieee80211_hw *hw)
>> {
>>
>> struct pci_dev *bridge_pdev = pdev->bus->self; //line 1601
>> ...
>>
>> pcipriv->ndis_adapter.pcibridge_vendorid = bridge_pdev->vendor; <-- [oops
>> here] line 1700
>>
>> ...
>> }
>>
>> here, I just want to know why the bus->self is NULL?
>
> pdev is coming straight from what is passed to the PCI probe routine.
> It seems like pdev->bus->self should already be set before that
> happens.
>
Yes, I think it should be initialized when added the pci bus bridge,
I have checked the mach-kirkwood(my board is arch/arm/mach-kirkwood)
pcie related code, and I think when system initialized should call
kirkwood_pcie_init() ->
kirkwood_pcie_scan_bus() ->
pci_scan_bus() ->
pci_bus_add_devices()
if the pci_bus->self was initialized in pci_bus_add_devices()?
Maybe the code is too complex for me , I really can not find where
set the “->self" member?
> Please open a bug at bugzilla.kernel.org to help us keep track of
> this -- thanks!
>
I have committed it the url,
https://bugzilla.kernel.org/show_bug.cgi?id=40212
> 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
* [PATCH] ipv6: some RCU conversions
From: Eric Dumazet @ 2011-07-28 7:13 UTC (permalink / raw)
To: David Miller; +Cc: netdev
ICMP and ND are not fast path, but still we can avoid changing idev
refcount, using RCU.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
net/ipv6/icmp.c | 25 ++++++++++---------------
net/ipv6/ndisc.c | 31 +++++++++++--------------------
2 files changed, 21 insertions(+), 35 deletions(-)
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 1190041..2b59154 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -490,7 +490,8 @@ void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info)
goto out_dst_release;
}
- idev = in6_dev_get(skb->dev);
+ rcu_read_lock();
+ idev = __in6_dev_get(skb->dev);
err = ip6_append_data(sk, icmpv6_getfrag, &msg,
len + sizeof(struct icmp6hdr),
@@ -500,19 +501,16 @@ void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info)
if (err) {
ICMP6_INC_STATS_BH(net, idev, ICMP6_MIB_OUTERRORS);
ip6_flush_pending_frames(sk);
- goto out_put;
+ } else {
+ err = icmpv6_push_pending_frames(sk, &fl6, &tmp_hdr,
+ len + sizeof(struct icmp6hdr));
}
- err = icmpv6_push_pending_frames(sk, &fl6, &tmp_hdr, len + sizeof(struct icmp6hdr));
-
-out_put:
- if (likely(idev != NULL))
- in6_dev_put(idev);
+ rcu_read_unlock();
out_dst_release:
dst_release(dst);
out:
icmpv6_xmit_unlock(sk);
}
-
EXPORT_SYMBOL(icmpv6_send);
static void icmpv6_echo_reply(struct sk_buff *skb)
@@ -569,7 +567,7 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
if (hlimit < 0)
hlimit = ip6_dst_hoplimit(dst);
- idev = in6_dev_get(skb->dev);
+ idev = __in6_dev_get(skb->dev);
msg.skb = skb;
msg.offset = 0;
@@ -583,13 +581,10 @@ static void icmpv6_echo_reply(struct sk_buff *skb)
if (err) {
ICMP6_INC_STATS_BH(net, idev, ICMP6_MIB_OUTERRORS);
ip6_flush_pending_frames(sk);
- goto out_put;
+ } else {
+ err = icmpv6_push_pending_frames(sk, &fl6, &tmp_hdr,
+ skb->len + sizeof(struct icmp6hdr));
}
- err = icmpv6_push_pending_frames(sk, &fl6, &tmp_hdr, skb->len + sizeof(struct icmp6hdr));
-
-out_put:
- if (likely(idev != NULL))
- in6_dev_put(idev);
dst_release(dst);
out:
icmpv6_xmit_unlock(sk);
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 9da6e02..1f52dd2 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -533,7 +533,8 @@ void ndisc_send_skb(struct sk_buff *skb,
skb_dst_set(skb, dst);
- idev = in6_dev_get(dst->dev);
+ rcu_read_lock();
+ idev = __in6_dev_get(dst->dev);
IP6_UPD_PO_STATS(net, idev, IPSTATS_MIB_OUT, skb->len);
err = NF_HOOK(NFPROTO_IPV6, NF_INET_LOCAL_OUT, skb, NULL, dst->dev,
@@ -543,8 +544,7 @@ void ndisc_send_skb(struct sk_buff *skb,
ICMP6_INC_STATS(net, idev, ICMP6_MIB_OUTMSGS);
}
- if (likely(idev != NULL))
- in6_dev_put(idev);
+ rcu_read_unlock();
}
EXPORT_SYMBOL(ndisc_send_skb);
@@ -1039,7 +1039,7 @@ static void ndisc_recv_rs(struct sk_buff *skb)
if (skb->len < sizeof(*rs_msg))
return;
- idev = in6_dev_get(skb->dev);
+ idev = __in6_dev_get(skb->dev);
if (!idev) {
if (net_ratelimit())
ND_PRINTK1("ICMP6 RS: can't find in6 device\n");
@@ -1080,7 +1080,7 @@ static void ndisc_recv_rs(struct sk_buff *skb)
neigh_release(neigh);
}
out:
- in6_dev_put(idev);
+ return;
}
static void ndisc_ra_useropt(struct sk_buff *ra, struct nd_opt_hdr *opt)
@@ -1179,7 +1179,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
* set the RA_RECV flag in the interface
*/
- in6_dev = in6_dev_get(skb->dev);
+ in6_dev = __in6_dev_get(skb->dev);
if (in6_dev == NULL) {
ND_PRINTK0(KERN_ERR
"ICMPv6 RA: can't find inet6 device for %s.\n",
@@ -1188,7 +1188,6 @@ static void ndisc_router_discovery(struct sk_buff *skb)
}
if (!ndisc_parse_options(opt, optlen, &ndopts)) {
- in6_dev_put(in6_dev);
ND_PRINTK2(KERN_WARNING
"ICMP6 RA: invalid ND options\n");
return;
@@ -1255,7 +1254,6 @@ static void ndisc_router_discovery(struct sk_buff *skb)
ND_PRINTK0(KERN_ERR
"ICMPv6 RA: %s() failed to add default route.\n",
__func__);
- in6_dev_put(in6_dev);
return;
}
@@ -1265,7 +1263,6 @@ static void ndisc_router_discovery(struct sk_buff *skb)
"ICMPv6 RA: %s() got default router without neighbour.\n",
__func__);
dst_release(&rt->dst);
- in6_dev_put(in6_dev);
return;
}
neigh->flags |= NTF_ROUTER;
@@ -1422,7 +1419,6 @@ out:
dst_release(&rt->dst);
else if (neigh)
neigh_release(neigh);
- in6_dev_put(in6_dev);
}
static void ndisc_redirect_rcv(struct sk_buff *skb)
@@ -1481,13 +1477,11 @@ static void ndisc_redirect_rcv(struct sk_buff *skb)
return;
}
- in6_dev = in6_dev_get(skb->dev);
+ in6_dev = __in6_dev_get(skb->dev);
if (!in6_dev)
return;
- if (in6_dev->cnf.forwarding || !in6_dev->cnf.accept_redirects) {
- in6_dev_put(in6_dev);
+ if (in6_dev->cnf.forwarding || !in6_dev->cnf.accept_redirects)
return;
- }
/* RFC2461 8.1:
* The IP source address of the Redirect MUST be the same as the current
@@ -1497,7 +1491,6 @@ static void ndisc_redirect_rcv(struct sk_buff *skb)
if (!ndisc_parse_options((u8*)(dest + 1), optlen, &ndopts)) {
ND_PRINTK2(KERN_WARNING
"ICMPv6 Redirect: invalid ND options\n");
- in6_dev_put(in6_dev);
return;
}
if (ndopts.nd_opts_tgt_lladdr) {
@@ -1506,7 +1499,6 @@ static void ndisc_redirect_rcv(struct sk_buff *skb)
if (!lladdr) {
ND_PRINTK2(KERN_WARNING
"ICMPv6 Redirect: invalid link-layer address length\n");
- in6_dev_put(in6_dev);
return;
}
}
@@ -1518,7 +1510,6 @@ static void ndisc_redirect_rcv(struct sk_buff *skb)
on_link);
neigh_release(neigh);
}
- in6_dev_put(in6_dev);
}
void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
@@ -1651,7 +1642,8 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
csum_partial(icmph, len, 0));
skb_dst_set(buff, dst);
- idev = in6_dev_get(dst->dev);
+ rcu_read_lock();
+ idev = __in6_dev_get(dst->dev);
IP6_UPD_PO_STATS(net, idev, IPSTATS_MIB_OUT, skb->len);
err = NF_HOOK(NFPROTO_IPV6, NF_INET_LOCAL_OUT, buff, NULL, dst->dev,
dst_output);
@@ -1660,8 +1652,7 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
ICMP6_INC_STATS(net, idev, ICMP6_MIB_OUTMSGS);
}
- if (likely(idev != NULL))
- in6_dev_put(idev);
+ rcu_read_unlock();
return;
release:
^ permalink raw reply related
* Re: r8169 driver crashes in 2.6.32.43
From: Francois Romieu @ 2011-07-28 7:04 UTC (permalink / raw)
To: Kasper Dupont; +Cc: ivecera, hayeswang, gregkh, netdev
In-Reply-To: <20110725103643.GA11135@colin.search.kasperd.net>
Kasper Dupont <kasperd@cpvhh.24.jul.2011.kasperd.net> :
[...]
> [ 1.045727] pata_sch 0000:00:1f.1: setting latency timer to 64
> [ 1.045946] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
> [ 1.046061] r8169 0000:02:00.0: PCI INT A -> GSI 16 (level, low) -> IRQ 16
> [ 1.046201] r8169 0000:02:00.0: setting latency timer to 64
> [ 1.046257] alloc irq_desc for 24 on node -1
> [ 1.046263] alloc kstat_irqs on node -1
> [ 1.046284] r8169 0000:02:00.0: irq 24 for MSI/MSI-X
> [ 1.048097] eth0: RTL8168c/8111c at 0xf8076000, 00:01:c0:09:a1:25, XID 1c4000c0 IRQ 24
RTL_GIGA_MAC_VER_22
[...]
> [ 1.082178] eth1: RTL8168c/8111c at 0xf8096000, 00:01:c0:09:a1:26, XID 1c4000c0 IRQ 25
sic.
I miss it (the light fast crash prone motherboard from hell does not count).
[...]
> It works on 2.6.32.32 it crashes on 2.6.32.33. I tried to
> take 2.6.32.43 and apply 1519e57fe81c14bb8fa4855579f19264d1ef63b4,
> that did not help. 2.6.32.43 crashes with and without that patch.
1519e57fe81c14bb8fa4855579f19264d1ef63b4 does not help RTL_GIGA_MAC_VER_22
proper but you may apply it, then move the 'case RTL_GIGA_MAC_VER_22:'
statement a few line below and see if it helps (assuming the fifo overflow
event may be ignored):
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 7d9c650..33c0ead 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -5383,7 +5383,6 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
switch (tp->mac_version) {
/* Work around for rx fifo overflow */
case RTL_GIGA_MAC_VER_11:
- case RTL_GIGA_MAC_VER_22:
case RTL_GIGA_MAC_VER_26:
netif_stop_queue(dev);
rtl8169_tx_timeout(dev);
@@ -5393,6 +5392,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
case RTL_GIGA_MAC_VER_19:
case RTL_GIGA_MAC_VER_20:
case RTL_GIGA_MAC_VER_21:
+ case RTL_GIGA_MAC_VER_22:
case RTL_GIGA_MAC_VER_23:
case RTL_GIGA_MAC_VER_24:
case RTL_GIGA_MAC_VER_27:
--
Ueimor
^ permalink raw reply related
* Re: invalid requirement from ethtool?
From: Eli Cohen @ 2011-07-28 7:23 UTC (permalink / raw)
To: David Miller; +Cc: netdev
In-Reply-To: <20110727.224309.779719590419361909.davem@davemloft.net>
On Wed, Jul 27, 2011 at 10:43:09PM -0700, David Miller wrote:
> From: Eli Cohen <eli@dev.mellanox.co.il>
> Date: Tue, 26 Jul 2011 15:42:22 +0300
>
> > I think both params zero should be allowed and mean coalescing is not
> > operational, thus we can remove these comments from ethtool.h
>
> The existing precendence has existed for more than 10 years. You can't
> just change it like this.
>
> You'll need to find a new way to encode "disabled" coalescing.
I can't see the text explicitly specifies how to "disable" coalescing.
If I ignore the specific comment that disallows both params 0, I could
interpret the text such that when they're both zero, the feature is
disabled.
BTW, I checked also Intel 10GBE Nic (ixgbe) driver and it allows
setting both 0.
^ permalink raw reply
* [PATCH] sis190: Rx filter init is needed for MAC address change.
From: Francois Romieu @ 2011-07-28 7:11 UTC (permalink / raw)
To: David Miller; +Cc: netdev, Klement Fish
Addresses https://bugzilla.kernel.org/show_bug.cgi?id=34552
Signed-off-by: Klement Fish <klement2@azet.sk>
Acked-by: Francois Romieu <romieu@fr.zoreil.com>
---
drivers/net/sis190.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/drivers/net/sis190.c b/drivers/net/sis190.c
index 8ad7bfb..3c0f131 100644
--- a/drivers/net/sis190.c
+++ b/drivers/net/sis190.c
@@ -1825,6 +1825,16 @@ static int sis190_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
generic_mii_ioctl(&tp->mii_if, if_mii(ifr), cmd, NULL);
}
+static int sis190_mac_addr(struct net_device *dev, void *p)
+{
+ int rc;
+
+ rc = eth_mac_addr(dev, p);
+ if (!rc)
+ sis190_init_rxfilter(dev);
+ return rc;
+}
+
static const struct net_device_ops sis190_netdev_ops = {
.ndo_open = sis190_open,
.ndo_stop = sis190_close,
@@ -1833,7 +1843,7 @@ static const struct net_device_ops sis190_netdev_ops = {
.ndo_tx_timeout = sis190_tx_timeout,
.ndo_set_multicast_list = sis190_set_rx_mode,
.ndo_change_mtu = eth_change_mtu,
- .ndo_set_mac_address = eth_mac_addr,
+ .ndo_set_mac_address = sis190_mac_addr,
.ndo_validate_addr = eth_validate_addr,
#ifdef CONFIG_NET_POLL_CONTROLLER
.ndo_poll_controller = sis190_netpoll,
--
1.7.4.4
^ permalink raw reply related
* Re: invalid requirement from ethtool?
From: David Miller @ 2011-07-28 7:37 UTC (permalink / raw)
To: eli; +Cc: netdev
In-Reply-To: <20110728072326.GC6750@mtldesk30>
From: Eli Cohen <eli@dev.mellanox.co.il>
Date: Thu, 28 Jul 2011 10:23:26 +0300
> On Wed, Jul 27, 2011 at 10:43:09PM -0700, David Miller wrote:
>> From: Eli Cohen <eli@dev.mellanox.co.il>
>> Date: Tue, 26 Jul 2011 15:42:22 +0300
>>
>> > I think both params zero should be allowed and mean coalescing is not
>> > operational, thus we can remove these comments from ethtool.h
>>
>> The existing precendence has existed for more than 10 years. You can't
>> just change it like this.
>>
>> You'll need to find a new way to encode "disabled" coalescing.
>
> I can't see the text explicitly specifies how to "disable" coalescing.
> If I ignore the specific comment that disallows both params 0, I could
> interpret the text such that when they're both zero, the feature is
> disabled.
The documentation does not determine what the rules are, the cpu
does not execute the documentation it executes the code, and that's
what determines the rules.
^ permalink raw reply
* Re: [PATCH] sis190: Rx filter init is needed for MAC address change.
From: David Miller @ 2011-07-28 7:39 UTC (permalink / raw)
To: romieu; +Cc: netdev, klement2
In-Reply-To: <20110728071123.GA11286@electric-eye.fr.zoreil.com>
From: Francois Romieu <romieu@fr.zoreil.com>
Date: Thu, 28 Jul 2011 09:11:23 +0200
> Addresses https://bugzilla.kernel.org/show_bug.cgi?id=34552
>
> Signed-off-by: Klement Fish <klement2@azet.sk>
> Acked-by: Francois Romieu <romieu@fr.zoreil.com>
So who wrote this patch?
If it's Klement, you need to add a "From: Klement Fish <klement2@azet.sk>"
to the body of your email so that GIT sets the authorship correctly.
If it's you, why are you only ACK'ing and not signing off on the change?
Either way you need to resubmit this :-)
^ 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