* Re: [PATCH 0/3] netfilter fixes for your net tree
From: David Miller @ 2013-03-07 20:23 UTC (permalink / raw)
To: pablo; +Cc: netdev, netfilter-devel
In-Reply-To: <1362654002-4405-1-git-send-email-pablo@netfilter.org>
From: pablo@netfilter.org
Date: Thu, 7 Mar 2013 11:59:59 +0100
> The following patchset contains Netfilter fixes for your net tree,
> they are:
>
> * Don't generate audit log message if audit is not enabled, from Gao Feng.
>
> * Fix logging formatting for packets dropped by helpers, by Joe Perches.
>
> * Fix a compilation warning in nfnetlink if CONFIG_PROVE_RCU is not set,
> from Paul Bolle.
>
> You can pull these changes from:
>
> git://1984.lsi.us.es/nf master
Pulled, but keep in mind that if there are any bugs in these changes I
know exactly where you are. :-)
^ permalink raw reply
* Re: [PATCH v2 1/7] USB: adds comment on suspend callback
From: Alan Stern @ 2013-03-07 20:26 UTC (permalink / raw)
To: Ming Lei
Cc: David S. Miller, Greg Kroah-Hartman, Jiri Kosina, Oliver Neukum,
netdev, linux-usb, linux-input
In-Reply-To: <1362672924-22975-2-git-send-email-ming.lei@canonical.com>
On Fri, 8 Mar 2013, Ming Lei wrote:
> This patch adds comments on interface driver suspend callback
> to emphasize that the failure return value is ignored by
> USB core in system sleep context, so do not try to recover
> device for this case and let resume/reset_resume callback
> handle the suspend failure if needed.
>
> Also kerneldoc for usb_suspend_both() is updated with the
> fact.
>
> Signed-off-by: Ming Lei <ming.lei@canonical.com>
> ---
> drivers/usb/core/driver.c | 11 ++++++++---
> include/linux/usb.h | 7 ++++++-
> 2 files changed, 14 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
> index d938b2b..eb1d00a 100644
> --- a/drivers/usb/core/driver.c
> +++ b/drivers/usb/core/driver.c
> @@ -1196,9 +1196,14 @@ done:
> *
> * This is the central routine for suspending USB devices. It calls the
> * suspend methods for all the interface drivers in @udev and then calls
> - * the suspend method for @udev itself. If an error occurs at any stage,
> - * all the interfaces which were suspended are resumed so that they remain
> - * in the same state as the device.
> + * the suspend method for @udev itself. When the routine is called in
> + * autosuspend, if an error occurs at any stage, all the interfaces
> + * which were suspended are resumed so that they remain in the same
> + * state as the device, but when called from system sleep, all error
> + * from suspend methods of interfaces and the non-root-hub device itself
> + * are simply ignored, so all suspended interfaces are only resumed
> + * to the device's state when @udev is root-hub and its suspend method
> + * returns failure.
> *
> * Autosuspend requests originating from a child device or an interface
> * driver may be made without the protection of @udev's device lock, but
> diff --git a/include/linux/usb.h b/include/linux/usb.h
> index 4d22d0f..f82ce57 100644
> --- a/include/linux/usb.h
> +++ b/include/linux/usb.h
> @@ -978,7 +978,12 @@ struct usbdrv_wrap {
> * the "usbfs" filesystem. This lets devices provide ways to
> * expose information to user space regardless of where they
> * do (or don't) show up otherwise in the filesystem.
> - * @suspend: Called when the device is going to be suspended by the system.
> + * @suspend: Called when the device is going to be suspended by the
> + * system either from system sleep or runtime suspend context. The
> + * return value will be ignored in system sleep context, so do NOT
> + * try to continue using the device if suspend fails in this case.
> + * Instead, let the resume or reset-resume routine recover from
> + * the failure.
> * @resume: Called when the device is being resumed by the system.
> * @reset_resume: Called when the suspended device has been reset instead
> * of being resumed.
Acked-by: Alan Stern <stern@rowland.harvard.edu>
^ permalink raw reply
* Re: [PATCH] macvlan: Set IFF_UNICAST_FLT flag to prevent unnecessary promisc mode.
From: Ben Greear @ 2013-03-07 20:27 UTC (permalink / raw)
To: Vlad Yasevich; +Cc: netdev
In-Reply-To: <1362687708-8685-1-git-send-email-vyasevic@redhat.com>
On 03/07/2013 12:21 PM, Vlad Yasevich wrote:
> Macvlan already supports hw address filters. Set the IFF_UNICAST_FLT
> so that it doesn't needlesly enter PROMISC mode when macvlans are
> stacked.
Out of curiosity, how can stacking mac-vlans be useful?
(You are stacking more macvlans on a base mac-vlan?)
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [PATCH v2 0/7] USB: don't recover device if suspend fails in system sleep
From: David Miller @ 2013-03-07 20:28 UTC (permalink / raw)
To: ming.lei; +Cc: gregkh, jkosina, stern, oneukum, netdev, linux-usb, linux-input
In-Reply-To: <1362672924-22975-1-git-send-email-ming.lei@canonical.com>
From: Ming Lei <ming.lei@canonical.com>
Date: Fri, 8 Mar 2013 00:15:17 +0800
> This patch adds comments on interface driver suspend callback
> to emphasize that the failure return value is ignored by
> USB core in system sleep context, so do not try to recover
> device for this case, otherwise the recovery things may confuse
> resume().
>
> Also fixes the USB serial, HID and several usbnet drivers
> which may recover device in suspend failure path of system sleep.
>
> v2:
> - improve comments on suspend callback as suggested by Alan
> - update kerneldoc for usb_suspend_both as suggested by Alan
> - remove previous check of PMSG_IS_AUTO(message) in cdc_mbim/
> qmi_wwan and add comments on suspend failure case, since Bjørn
> doesn't like the check.
> - add comments on smsc95xx/smsc75xx
> v1:
> - fix compile failure
> - add comments about handling suspend failure in resume()
Feel free to merge this via the USB tree and to add my ACK to the
networking driver bits:
Acked-by: David S. Miller <davem@davemloft.net>
--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH v2 resent net-next 0/4] Provide default fdb operation to allow mac filter setting
From: David Miller @ 2013-03-07 20:30 UTC (permalink / raw)
To: vyasevic; +Cc: netdev, or.gerlitz
In-Reply-To: <1362620385-14553-1-git-send-email-vyasevic@redhat.com>
From: Vlad Yasevich <vyasevic@redhat.com>
Date: Wed, 6 Mar 2013 20:39:41 -0500
> This is a short series that now allows mac filter programming on any
> card that support IFF_UNICAST_FLT by using the existing FDB interface.
>
> Some existing drivers that had FDB functionality usually supported
> it only in SR-IOV mode. Since that's not always enabled, and
> we want to take advantage of IFF_UNICAST_FLT support, these drivers
> have been converted to call the default handler when not in SRIOV mode.
Series applied, thanks Vlad.
^ permalink raw reply
* Re: [PATCH net-next 0/6] Add support to download EEE firmware for the 57766
From: David Miller @ 2013-03-07 20:32 UTC (permalink / raw)
To: nsujir; +Cc: netdev
In-Reply-To: <1362625354-15095-1-git-send-email-nsujir@broadcom.com>
From: "Nithin Nayak Sujir" <nsujir@broadcom.com>
Date: Wed, 6 Mar 2013 19:02:28 -0800
> For the 57766 devices with no NVRAM, there is not enough space for the complete
> boot code with EEE support. On these devices, the tg3 driver has to download
> a service patch firmware to the scratchpad for the boot code to execute. This
> patchset adds support to do the above.
>
> A major portion of this patchset is refactoring the existing firmware download
> section to allow a cleaner merge of the 57766 download. The 57766 firmware
> differs from previous firmware in that it's not written to a contiguous area in
> memory. It consists of multiple fragments to be written to different locations.
> The patchset makes an attempt to make the new firmware format to be an
> extension of the existing format.
Series applied, thanks.
^ permalink raw reply
* Re: [PATCH] macvlan: Set IFF_UNICAST_FLT flag to prevent unnecessary promisc mode.
From: Vlad Yasevich @ 2013-03-07 20:32 UTC (permalink / raw)
To: Ben Greear; +Cc: netdev
In-Reply-To: <5138F82F.6010005@candelatech.com>
On 03/07/2013 03:27 PM, Ben Greear wrote:
> On 03/07/2013 12:21 PM, Vlad Yasevich wrote:
>> Macvlan already supports hw address filters. Set the IFF_UNICAST_FLT
>> so that it doesn't needlesly enter PROMISC mode when macvlans are
>> stacked.
>
> Out of curiosity, how can stacking mac-vlans be useful?
>
> (You are stacking more macvlans on a base mac-vlan?)
Yep, and macvlans allows, but it looks like it only tries to detect a 2
level stack. I am not sure what the reason is. Might be realated to
vlan-to-vlan communication.
-vlad
>
> Thanks,
> Ben
>
^ permalink raw reply
* Re: [net-next.git 0/9] stmmac: update to March_2013 (adding PTP & RGMII/SGMII)
From: David Miller @ 2013-03-07 20:34 UTC (permalink / raw)
To: peppe.cavallaro; +Cc: netdev, bh74.an, ayagond
In-Reply-To: <1362653419-1047-1-git-send-email-peppe.cavallaro@st.com>
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
Date: Thu, 7 Mar 2013 11:50:10 +0100
> The PTP support is quite intrusive because it needs to support the extended
> descriptors used for saving the HW timestamps.
> These are available in new chip generations, only.
> So we have actually found useful to use some Kconfig options to
> surround PTP and extended descriptor support. This approach helped on
> old platform (embeeded system) where PTP is not supported and where we
> do not want to pay extra code and check in critical rx/tx paths.
I would prefer run time handling of all of this.
You do not need to put extra checks in the fast paths, instead you
have different methods that get hooked up into the netdev_ops
based upon chip capabilities/features/mode.
Thanks.
^ permalink raw reply
* Re: [PATCH] ipv6 addrconf: Fix addrconf_ifid_eui64 of 802.15.4 devices
From: Alexander Aring @ 2013-03-07 20:41 UTC (permalink / raw)
To: davem; +Cc: kuznet, jmorris, yoshfuji, linux-zigbee-devel, netdev
In-Reply-To: <1362687183-3425-1-git-send-email-alex.aring@gmail.com>
Hi,
I don't know if this is a right solution for that, because other
functions like addrconf_ifid_infiniband to manipulate eui after memcpy,
too.
But this patch solves my problems with ieee802154 stack.
Any other ideas?
Regards
Alex
^ permalink raw reply
* Re: [PATCH] macvlan: Set IFF_UNICAST_FLT flag to prevent unnecessary promisc mode.
From: Vlad Yasevich @ 2013-03-07 20:43 UTC (permalink / raw)
To: Ben Greear; +Cc: netdev
In-Reply-To: <5138F95A.9010305@redhat.com>
On 03/07/2013 03:32 PM, Vlad Yasevich wrote:
> On 03/07/2013 03:27 PM, Ben Greear wrote:
>> On 03/07/2013 12:21 PM, Vlad Yasevich wrote:
>>> Macvlan already supports hw address filters. Set the IFF_UNICAST_FLT
>>> so that it doesn't needlesly enter PROMISC mode when macvlans are
>>> stacked.
>>
>> Out of curiosity, how can stacking mac-vlans be useful?
>>
>> (You are stacking more macvlans on a base mac-vlan?)
>
> Yep, and macvlans allows, but it looks like it only tries to detect a 2
> level stack. I am not sure what the reason is. Might be realated to
> vlan-to-vlan communication.
Aha. The reason is explained in this commit.
commit b0832a2961022a076c812384435b5f0290b3fc91
Author: Eric Biederman <ebiederm@aristanetworks.com>
Date: Fri Mar 13 13:15:37 2009 -0700
macvlan: Support creating macvlans from macvlans
When running in a network namespace whose only link to
the outside world is a macvlan device, not being
able to create another macvlan is a real pain.
So modify macvlan creation to allow automatically forward
a creation of a macvlan on a macvlan to become a creation
of a macvlan on the underlying network device.
I don't know if it's useful to support more then 2 levels.
-vlad
>
> -vlad
>
>>
>> Thanks,
>> Ben
>>
>
^ permalink raw reply
* Re: [PATCH net 0/6] Mellanox Core and Ethernet driver fixes 2013-03-07
From: David Miller @ 2013-03-07 20:52 UTC (permalink / raw)
To: ogerlitz; +Cc: netdev, amirv
In-Reply-To: <1362664017-30275-1-git-send-email-ogerlitz@mellanox.com>
From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Thu, 7 Mar 2013 15:46:51 +0200
> Here's a batch of fixes to the mlx4 core and ethernet drivers for 3.9
>
> The commit that disabled RFS when running in SRIOV mode fixes a regression which was
> introduced in 3.9-rc1 but actually present also in the 3.8 -stable series. It turns out
> that a slightly different fix is needed there and we will generate and submit it there.
>
> Patches done against net commit 66d29cbc59433 "benet: Wait f/w POST until timeout"
Series applied, thanks.
^ permalink raw reply
* [PATCH net-next v3 1/4] ipv6: introdcue __ipv6_addr_needs_scope_id and ipv6_iface_scope_id helper functions
From: Hannes Frederic Sowa @ 2013-03-07 21:05 UTC (permalink / raw)
To: netdev; +Cc: yoshfuji
__ipv6_addr_needs_scope_id checks if an ipv6 address needs to supply
a 'sin6_scope_id != 0'. 'sin6_scope_id != 0' was enforced in case
of link-local addresses. To support interface-local multicast these
checks had to be enhanced and are now consolidated into these new helper
functions.
v2:
a) migrated to struct ipv6_addr_props
v3:
a) reverted changes for ipv6_addr_props
b) test for address type instead of comparing scope
Suggested-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
include/net/ipv6.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index 64d12e7..e11d304 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -320,6 +320,18 @@ static inline int ipv6_addr_src_scope(const struct in6_addr *addr)
return __ipv6_addr_src_scope(__ipv6_addr_type(addr));
}
+static inline bool __ipv6_addr_needs_scope_id(int type)
+{
+ return type & IPV6_ADDR_LINKLOCAL ||
+ (type & IPV6_ADDR_MULTICAST &&
+ (type & (IPV6_ADDR_LOOPBACK|IPV6_ADDR_LINKLOCAL)));
+}
+
+static inline __u32 ipv6_iface_scope_id(const struct in6_addr *addr, int iface)
+{
+ return __ipv6_addr_needs_scope_id(__ipv6_addr_type(addr)) ? iface : 0;
+}
+
static inline int ipv6_addr_cmp(const struct in6_addr *a1, const struct in6_addr *a2)
{
return memcmp(a1, a2, sizeof(struct in6_addr));
--
1.8.1.4
^ permalink raw reply related
* [PATCH net-next v3 2/4] ipv6: use newly introduced __ipv6_addr_needs_scope_id and ipv6_iface_scope_id
From: Hannes Frederic Sowa @ 2013-03-07 21:05 UTC (permalink / raw)
To: netdev; +Cc: yoshfuji
This patch requires multicast interface-scoped addresses to supply a
sin6_scope_id. Because the sin6_scope_id is now also correctly used
in case of interface-scoped multicast traffic this enables one to use
interface scoped addresses over interfaces which are not targeted by the
default multicast route (the route has to be put there manually, though).
getsockname() and getpeername() now return the correct sin6_scope_id in
case of interface-local mc addresses.
v2:
a) rebased ontop of patch 1/4 (now uses ipv6_addr_props)
v3:
a) reverted changes for ipv6_addr_props
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
net/ipv6/af_inet6.c | 6 +++---
net/ipv6/datagram.c | 16 +++++++++-------
net/ipv6/icmp.c | 2 +-
net/ipv6/inet6_connection_sock.c | 6 ++----
net/ipv6/raw.c | 9 ++++-----
net/ipv6/udp.c | 13 +++++++------
6 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 6b793bf..f56277f 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -323,7 +323,7 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
struct net_device *dev = NULL;
rcu_read_lock();
- if (addr_type & IPV6_ADDR_LINKLOCAL) {
+ if (__ipv6_addr_needs_scope_id(addr_type)) {
if (addr_len >= sizeof(struct sockaddr_in6) &&
addr->sin6_scope_id) {
/* Override any existing binding, if another one
@@ -471,8 +471,8 @@ int inet6_getname(struct socket *sock, struct sockaddr *uaddr,
sin->sin6_port = inet->inet_sport;
}
- if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL)
- sin->sin6_scope_id = sk->sk_bound_dev_if;
+ sin->sin6_scope_id = ipv6_iface_scope_id(&sin->sin6_addr,
+ sk->sk_bound_dev_if);
*uaddr_len = sizeof(*sin);
return 0;
}
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
index f5a5478..b55e70a 100644
--- a/net/ipv6/datagram.c
+++ b/net/ipv6/datagram.c
@@ -124,7 +124,7 @@ ipv4_connected:
goto out;
}
- if (addr_type&IPV6_ADDR_LINKLOCAL) {
+ if (__ipv6_addr_needs_scope_id(addr_type)) {
if (addr_len >= sizeof(struct sockaddr_in6) &&
usin->sin6_scope_id) {
if (sk->sk_bound_dev_if &&
@@ -355,18 +355,19 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len)
sin->sin6_family = AF_INET6;
sin->sin6_flowinfo = 0;
sin->sin6_port = serr->port;
- sin->sin6_scope_id = 0;
if (skb->protocol == htons(ETH_P_IPV6)) {
const struct ipv6hdr *ip6h = container_of((struct in6_addr *)(nh + serr->addr_offset),
struct ipv6hdr, daddr);
sin->sin6_addr = ip6h->daddr;
if (np->sndflow)
sin->sin6_flowinfo = ip6_flowinfo(ip6h);
- if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL)
- sin->sin6_scope_id = IP6CB(skb)->iif;
+ sin->sin6_scope_id =
+ ipv6_iface_scope_id(&sin->sin6_addr,
+ IP6CB(skb)->iif);
} else {
ipv6_addr_set_v4mapped(*(__be32 *)(nh + serr->addr_offset),
&sin->sin6_addr);
+ sin->sin6_scope_id = 0;
}
}
@@ -376,18 +377,19 @@ int ipv6_recv_error(struct sock *sk, struct msghdr *msg, int len)
if (serr->ee.ee_origin != SO_EE_ORIGIN_LOCAL) {
sin->sin6_family = AF_INET6;
sin->sin6_flowinfo = 0;
- sin->sin6_scope_id = 0;
if (skb->protocol == htons(ETH_P_IPV6)) {
sin->sin6_addr = ipv6_hdr(skb)->saddr;
if (np->rxopt.all)
ip6_datagram_recv_ctl(sk, msg, skb);
- if (ipv6_addr_type(&sin->sin6_addr) & IPV6_ADDR_LINKLOCAL)
- sin->sin6_scope_id = IP6CB(skb)->iif;
+ sin->sin6_scope_id =
+ ipv6_iface_scope_id(&sin->sin6_addr,
+ IP6CB(skb)->iif);
} else {
struct inet_sock *inet = inet_sk(sk);
ipv6_addr_set_v4mapped(ip_hdr(skb)->saddr,
&sin->sin6_addr);
+ sin->sin6_scope_id = 0;
if (inet->cmsg_flags)
ip_cmsg_recv(msg, skb);
}
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index fff5bdd..71b900c 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -434,7 +434,7 @@ void icmpv6_send(struct sk_buff *skb, u8 type, u8 code, __u32 info)
* Source addr check
*/
- if (addr_type & IPV6_ADDR_LINKLOCAL)
+ if (__ipv6_addr_needs_scope_id(addr_type))
iif = skb->dev->ifindex;
/*
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c
index 5f25510..e4311cb 100644
--- a/net/ipv6/inet6_connection_sock.c
+++ b/net/ipv6/inet6_connection_sock.c
@@ -173,10 +173,8 @@ void inet6_csk_addr2sockaddr(struct sock *sk, struct sockaddr * uaddr)
sin6->sin6_port = inet_sk(sk)->inet_dport;
/* We do not store received flowlabel for TCP */
sin6->sin6_flowinfo = 0;
- sin6->sin6_scope_id = 0;
- if (sk->sk_bound_dev_if &&
- ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL)
- sin6->sin6_scope_id = sk->sk_bound_dev_if;
+ sin6->sin6_scope_id = ipv6_iface_scope_id(&sin6->sin6_addr,
+ sk->sk_bound_dev_if);
}
EXPORT_SYMBOL_GPL(inet6_csk_addr2sockaddr);
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
index 330b5e7..eedff8c 100644
--- a/net/ipv6/raw.c
+++ b/net/ipv6/raw.c
@@ -263,7 +263,7 @@ static int rawv6_bind(struct sock *sk, struct sockaddr *uaddr, int addr_len)
if (addr_type != IPV6_ADDR_ANY) {
struct net_device *dev = NULL;
- if (addr_type & IPV6_ADDR_LINKLOCAL) {
+ if (__ipv6_addr_needs_scope_id(addr_type)) {
if (addr_len >= sizeof(struct sockaddr_in6) &&
addr->sin6_scope_id) {
/* Override any existing binding, if another
@@ -498,9 +498,8 @@ static int rawv6_recvmsg(struct kiocb *iocb, struct sock *sk,
sin6->sin6_port = 0;
sin6->sin6_addr = ipv6_hdr(skb)->saddr;
sin6->sin6_flowinfo = 0;
- sin6->sin6_scope_id = 0;
- if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL)
- sin6->sin6_scope_id = IP6CB(skb)->iif;
+ sin6->sin6_scope_id = ipv6_iface_scope_id(&sin6->sin6_addr,
+ IP6CB(skb)->iif);
}
sock_recv_ts_and_drops(msg, sk, skb);
@@ -802,7 +801,7 @@ static int rawv6_sendmsg(struct kiocb *iocb, struct sock *sk,
if (addr_len >= sizeof(struct sockaddr_in6) &&
sin6->sin6_scope_id &&
- ipv6_addr_type(daddr)&IPV6_ADDR_LINKLOCAL)
+ __ipv6_addr_needs_scope_id(__ipv6_addr_type(daddr)))
fl6.flowi6_oif = sin6->sin6_scope_id;
} else {
if (sk->sk_state != TCP_ESTABLISHED)
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c
index 599e1ba6..3ed57ec 100644
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -450,15 +450,16 @@ try_again:
sin6->sin6_family = AF_INET6;
sin6->sin6_port = udp_hdr(skb)->source;
sin6->sin6_flowinfo = 0;
- sin6->sin6_scope_id = 0;
- if (is_udp4)
+ if (is_udp4) {
ipv6_addr_set_v4mapped(ip_hdr(skb)->saddr,
&sin6->sin6_addr);
- else {
+ sin6->sin6_scope_id = 0;
+ } else {
sin6->sin6_addr = ipv6_hdr(skb)->saddr;
- if (ipv6_addr_type(&sin6->sin6_addr) & IPV6_ADDR_LINKLOCAL)
- sin6->sin6_scope_id = IP6CB(skb)->iif;
+ sin6->sin6_scope_id =
+ ipv6_iface_scope_id(&sin6->sin6_addr,
+ IP6CB(skb)->iif);
}
}
@@ -1118,7 +1119,7 @@ do_udp_sendmsg:
if (addr_len >= sizeof(struct sockaddr_in6) &&
sin6->sin6_scope_id &&
- ipv6_addr_type(daddr)&IPV6_ADDR_LINKLOCAL)
+ __ipv6_addr_needs_scope_id(__ipv6_addr_type(daddr)))
fl6.flowi6_oif = sin6->sin6_scope_id;
} else {
if (sk->sk_state != TCP_ESTABLISHED)
--
1.8.1.4
^ permalink raw reply related
* [PATCH net-next v3 3/4] ipv6: stop multicast forwarding to process interface scoped addresses
From: Hannes Frederic Sowa @ 2013-03-07 21:05 UTC (permalink / raw)
To: netdev; +Cc: yoshfuji
v2:
a) used struct ipv6_addr_props
v3:
a) reverted changes for ipv6_addr_props
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
net/ipv6/ip6_input.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c
index b1876e5..b73bcc2 100644
--- a/net/ipv6/ip6_input.c
+++ b/net/ipv6/ip6_input.c
@@ -281,7 +281,7 @@ int ip6_mc_input(struct sk_buff *skb)
* IPv6 multicast router mode is now supported ;)
*/
if (dev_net(skb->dev)->ipv6.devconf_all->mc_forwarding &&
- !(ipv6_addr_type(&hdr->daddr) & IPV6_ADDR_LINKLOCAL) &&
+ !__ipv6_addr_needs_scope_id((ipv6_addr_type(&hdr->daddr))) &&
likely(!(IP6CB(skb)->flags & IP6SKB_FORWARDED))) {
/*
* Okay, we try to forward - split and duplicate
--
1.8.1.4
^ permalink raw reply related
* [PATCH net-next v3 4/4] ipv6: report sin6_scope_id if sockopt RECVORIGDSTADDR is set
From: Hannes Frederic Sowa @ 2013-03-07 21:05 UTC (permalink / raw)
To: netdev; +Cc: yoshfuji
Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: Hannes Frederic Sowa <hannes@stressinduktion.org>
---
net/ipv6/datagram.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c
index b55e70a..4b56cbb 100644
--- a/net/ipv6/datagram.c
+++ b/net/ipv6/datagram.c
@@ -594,7 +594,9 @@ int ip6_datagram_recv_ctl(struct sock *sk, struct msghdr *msg,
sin6.sin6_addr = ipv6_hdr(skb)->daddr;
sin6.sin6_port = ports[1];
sin6.sin6_flowinfo = 0;
- sin6.sin6_scope_id = 0;
+ sin6.sin6_scope_id =
+ ipv6_iface_scope_id(&ipv6_hdr(skb)->daddr,
+ opt->iif);
put_cmsg(msg, SOL_IPV6, IPV6_ORIGDSTADDR, sizeof(sin6), &sin6);
}
--
1.8.1.4
^ permalink raw reply related
* Re: [PATCH net-next] vmxnet3: prevent div-by-zero panic when ring resizing uninitialized dev
From: David Miller @ 2013-03-07 21:11 UTC (permalink / raw)
To: bhavesh; +Cc: netdev, linux-kernel, pv-drivers, sbhatewara
In-Reply-To: <1362607493-5634-1-git-send-email-bhavesh@vmware.com>
From: Bhavesh Davda <bhavesh@vmware.com>
Date: Wed, 6 Mar 2013 14:04:53 -0800
> Linux is free to call ethtool ops as soon as a netdev exists when probe
> finishes. However, we only allocate vmxnet3 tx/rx queues and initialize the
> rx_buf_per_pkt field in struct vmxnet3_adapter when the interface is
> opened (UP).
>
> Signed-off-by: Bhavesh Davda <bhavesh@vmware.com>
> Signed-off-by: Shreyas N Bhatewara <sbhatewara@vmware.com>
As discussed yesterday, I'm applying this to 'net', thanks.
^ permalink raw reply
* Re: [PATCH 1/1] vxlan: fix oops when delete netns containing vxlan
From: David Miller @ 2013-03-07 21:13 UTC (permalink / raw)
To: zealot0630; +Cc: netdev
In-Reply-To: <1362580657-25580-1-git-send-email-zealot0630@gmail.com>
From: Zang MingJie <zealot0630@gmail.com>
Date: Wed, 6 Mar 2013 22:37:37 +0800
>
> The following script will produce a kernel oops:
>
> sudo ip netns add v
> sudo ip netns exec v ip ad add 127.0.0.1/8 dev lo
> sudo ip netns exec v ip link set lo up
> sudo ip netns exec v ip ro add 224.0.0.0/4 dev lo
> sudo ip netns exec v ip li add vxlan0 type vxlan id 42 group 239.1.1.1 dev lo
> sudo ip netns exec v ip link set vxlan0 up
> sudo ip netns del v
>
> where inspect by gdb:
...
> The kernel calls `vxlan_exit_net` when deleting the netns before shutting down
> vxlan interfaces. Later the removal of all vxlan interfaces, where `vn->sock`
> is already gone causes the oops. so we should manually shutdown all interfaces
> before deleting `vn->sock` as the patch does.
>
> Signed-off-by: Zang MingJie <zealot0630@gmail.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply
* Re: [PATCH] netconsole: release the spinlock before __netpoll_cleanup()
From: David Miller @ 2013-03-07 21:14 UTC (permalink / raw)
To: vfalico; +Cc: nhorman, netdev, amwang
In-Reply-To: <20130307100325.GA31105@redhat.com>
From: Veaceslav Falico <vfalico@redhat.com>
Date: Thu, 7 Mar 2013 11:03:25 +0100
> @@ -680,9 +681,21 @@ static int netconsole_netdev_event(struct
> notifier_block *this,
> * rtnl_lock already held
> */
> if (nt->np.dev) {
> + /*
> + * we still might sleep in
> + * __netpoll_cleanup(), so release
> + * the lock and restart
Quite a bit of email corruption of this patch.
Also, this code block is probably too deeply indented to be sane,
consider creating a small helper function to call instead.
^ permalink raw reply
* Re: [PATCH] bonding: fire NETDEV_RELEASE event only on 0 slaves
From: David Miller @ 2013-03-07 21:15 UTC (permalink / raw)
To: nhorman; +Cc: vfalico, netdev, fubar, andy
In-Reply-To: <20130307033819.GA3513@neilslaptop.think-freely.org>
From: Neil Horman <nhorman@tuxdriver.com>
Date: Wed, 6 Mar 2013 22:38:19 -0500
> On Wed, Mar 06, 2013 at 06:10:32PM +0100, Veaceslav Falico wrote:
>> Currently, if we set up netconsole over bonding and release a slave,
>> netconsole will stop logging on the whole bonding device. Change the
>> behavior to stop the netconsole only when the last slave is released.
>>
>> Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
...
> Acked-by: Neil Horman <nhorman@tuxdriver.com>
Applied, thanks everyone.
^ permalink raw reply
* Re: [PATCH] fix mv643xx_eth for disabled autoneg
From: David Miller @ 2013-03-07 21:18 UTC (permalink / raw)
To: phil.sutter; +Cc: buytenh, netdev
In-Reply-To: <1362592142-4049-1-git-send-email-phil.sutter@viprinet.com>
From: Phil Sutter <phil.sutter@viprinet.com>
Date: Wed, 6 Mar 2013 18:49:02 +0100
> When autoneg has been disabled in the PHY (Marvell 88E1118 here), auto
> negotiation between MAC and PHY seem non-functional anymore. The only
> way I found to workaround this is to manually configure the MAC with the
> settings sent to the PHY earlier.
>
> Signed-off-by: Phil Sutter <phil.sutter@viprinet.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH] netlabel: correctly list all the static label mappings
From: David Miller @ 2013-03-07 21:21 UTC (permalink / raw)
To: pmoore; +Cc: netdev
In-Reply-To: <20130306214524.4965.59796.stgit@localhost>
From: Paul Moore <pmoore@redhat.com>
Date: Wed, 06 Mar 2013 16:45:24 -0500
> When we have a large number of static label mappings that spill across
> the netlink message boundary we fail to properly save our state in the
> netlink_callback struct which causes us to repeat the same listings.
> This patch fixes this problem by saving the state correctly between
> calls to the NetLabel static label netlink "dumpit" routines.
>
> Signed-off-by: Paul Moore <pmoore@redhat.com>
Applied and queued up for -stable, thanks.
> Cc: stable@vger.kernel.org
Please just ask me to queue up networking fixes for stable, rather
than CC:'ing it to stable.
Thanks.
^ permalink raw reply
* Re: [PATCH] MAINTAINERS: Update qlcnic maintainers list
From: David Miller @ 2013-03-07 21:22 UTC (permalink / raw)
To: sony.chacko; +Cc: netdev, Dept_NX_Linux_NIC_Driver
In-Reply-To: <1362611005-6226-1-git-send-email-sony.chacko@qlogic.com>
From: Sony Chacko <sony.chacko@qlogic.com>
Date: Wed, 6 Mar 2013 18:03:25 -0500
> From: Sony Chacko <sony.chacko@qlogic.com>
>
> Please apply.
>
> Thanks.
>
> Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Applied, thanks.
^ permalink raw reply
* Re: [PATCH net-next] tcp: uninline tcp_prequeue()
From: David Miller @ 2013-03-07 21:23 UTC (permalink / raw)
To: eric.dumazet; +Cc: netdev
In-Reply-To: <1362610681.15793.205.camel@edumazet-glaptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Wed, 06 Mar 2013 14:58:01 -0800
> From: Eric Dumazet <edumazet@google.com>
>
> tcp_prequeue() became too big to be inlined.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
Applied, thanks Eric.
^ permalink raw reply
* Re: [PATCH v2] CAIF: fix indentation for function arguments
From: David Miller @ 2013-03-07 21:25 UTC (permalink / raw)
To: silviupopescu1990; +Cc: netdev, sjur.brandeland, linux-kernel
In-Reply-To: <1362634797-28720-1-git-send-email-silviupopescu1990@gmail.com>
From: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Date: Thu, 7 Mar 2013 07:39:57 +0200
> This lines up function arguments on second and subsequent lines at the
> first column after the openning parenthesis of the first line.
>
> Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Applied to net-next, thanks.
^ permalink raw reply
* Re: [PATCH] vhost_net: remove tx polling state
From: David Miller @ 2013-03-07 21:25 UTC (permalink / raw)
To: jasowang; +Cc: netdev, virtualization, linux-kernel, kvm, mst
In-Reply-To: <1362630716-57674-1-git-send-email-jasowang@redhat.com>
From: Jason Wang <jasowang@redhat.com>
Date: Thu, 7 Mar 2013 12:31:56 +0800
> After commit 2b8b328b61c799957a456a5a8dab8cc7dea68575 (vhost_net: handle polling
> errors when setting backend), we in fact track the polling state through
> poll->wqh, so there's no need to duplicate the work with an extra
> vhost_net_polling_state. So this patch removes this and make the code simpler.
>
> Signed-off-by: Jason Wang <jasowang@redhat.com>
Can I get an ACK or two from some VHOST folks?
^ 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