* Re: [PATCH v2.39 7/7] datapath: Add basic MPLS support to kernel
From: Simon Horman @ 2013-09-19 20:45 UTC (permalink / raw)
To: Pravin Shelar
Cc: dev-yBygre7rU0TnMu66kgdUjQ@public.gmane.org, netdev, Ravi K,
Isaku Yamahata
In-Reply-To: <20130918220756.GA24919-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
On Wed, Sep 18, 2013 at 05:07:59PM -0500, Simon Horman wrote:
> On Tue, Sep 17, 2013 at 11:38:18AM -0700, Pravin Shelar wrote:
> > On Mon, Sep 9, 2013 at 12:20 AM, Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org> wrote:
> > > Allow datapath to recognize and extract MPLS labels into flow keys
> > > and execute actions which push, pop, and set labels on packets.
> > >
> > > Based heavily on work by Leo Alterman, Ravi K, Isaku Yamahata and Joe Stringer.
> > >
> > > Cc: Ravi K <rkerur-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> > > Cc: Leo Alterman <lalterman-l0M0P4e3n4LQT0dZR+AlfA@public.gmane.org>
> > > Cc: Isaku Yamahata <yamahata-jCdQPDEk3idL9jVzuh4AOg@public.gmane.org>
> > > Cc: Joe Stringer <joe-Q1GJJQv1iO6lP80pJB477g@public.gmane.org>
> > > Signed-off-by: Simon Horman <horms-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>
> > >
> > > ---
> > ....
> > > diff --git a/datapath/datapath.h b/datapath/datapath.h
> > > index 5d50dd4..babae3b 100644
> > > --- a/datapath/datapath.h
> > > +++ b/datapath/datapath.h
> > > @@ -36,6 +36,10 @@
> > >
> > > #define SAMPLE_ACTION_DEPTH 3
> > >
> > > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
> > > +#define HAVE_INNER_PROTOCOL
> > > +#endif
> > > +
> > > /**
> > > * struct dp_stats_percpu - per-cpu packet processing statistics for a given
> > > * datapath.
> > > @@ -93,11 +97,16 @@ struct datapath {
> > > * @pkt_key: The flow information extracted from the packet. Must be nonnull.
> > > * @tun_key: Key for the tunnel that encapsulated this packet. NULL if the
> > > * packet is not being tunneled.
> > > + * @inner_protocol: Provides a substitute for the skb->inner_protocol field on
> > > + * kernels before 3.11.
> > > */
> > > struct ovs_skb_cb {
> > > struct sw_flow *flow;
> > > struct sw_flow_key *pkt_key;
> > > struct ovs_key_ipv4_tunnel *tun_key;
> > > +#ifndef HAVE_INNER_PROTOCOL
> > > + __be16 inner_protocol;
> > > +#endif
> > > };
> > > #define OVS_CB(skb) ((struct ovs_skb_cb *)(skb)->cb)
> > >
> > Can you move this to compat struct ovs_gso_cb {}
>
> I think that you are correct and inner_protocol needs
> to be in struct ovs_gso_cb so that it can
> be accessed via skb_network_protocol() from
> rpl___skb_gso_segment().
>
> However I think it may also need to be present in struct ovs_cb
> so that it can be set correctly.
>
> Currently it is set unconditionally
> in ovs_execute_actions() and Jesse has suggested setting
> it conditionally in pop_mpls() (which is called by do_execute_actions()).
> But regardless it seems to me that the field would need to be available
> in struct ovs_cb.
Having reviewed the code once more I now notice that struct ovs_gso_cb
contains struct ovs_skb_cb dp_cb. Whereas my previous assumption was
that they were mutually exclusive.
With this in mind I think it should be safe to use ovs_gso_cb from
ovs_execute_actions() or do_execute_actions() but I would value
your opinion on that.
Conversely, if inner_protocol was left in struct ovs_skb_cb there should
be no problem with accessing it from GSO code as the code currently does.
So I am not sure that I see the value of moving it but I am happy to do
so if you think it is safe and it is your preferred option.
^ permalink raw reply
* [GIT] Networking
From: David Miller @ 2013-09-19 18:55 UTC (permalink / raw)
To: torvalds; +Cc: akpm, netdev, linux-kernel
1) If the local_df boolean is set on an SKB we have to allocate a
unique ID even if IP_DF is set in the ipv4 headers, from Ansis
Atteka.
2) Some fixups for the new chipset support that went into the sfc
driver, from Ben Hutchings.
3) Because SCTP bypasses a good chunk of, and actually duplicates, the
logic of the ipv6 output path, some IPSEC things don't get done
properly. Integrate SCTP better into the ipv6 output path so
that these problems are fixed and such issues don't get missed
in the future either. From Daniel Borkmann.
4) Fix skge regressions added by the DMA mapping error return
checking added in v3.10, from Mikulas Patocka.
5) Kill some more IRQF_DISABLED references, from Michael Opdenacker.
6) Fix races and deadlocks in the bridging code, from Hong Zhiguo.
7) Fix error handling in tun_set_iff(), in particular don't leak
resources. From Jason Wang.
8) Prevent format-string injection into xen-netback driver, from
Kees Cook.
9) Fix regression added to netpoll ARP packet handling, in particular
check for the right ETH_P_ARP protocol code. From Sonic Zhang.
10) Try to deal with AMD IOMMU errors when using r8169 chips, from
Francois Romieu.
11) Cure freezes due to recent changes in the rt2x00 wireless driver,
from Stanislaw Gruszka.
12) Don't do SPI transfers (which can sleep) in interrupt context
in cw1200 driver, from Solomon Peachy.
13) Fix LEDs handling bug in 5720 tg3 chips already handled for 5719.
From Nithin Sujir.
14) Make xen_netbk_count_skb_slots() count the actual number of slots
that will be used, taking into consideration packing and other
issues that the transmit path will run into. From David
Vrabel.
15) Use the correct maximum age when calculating the bridge
message_age_timer, from Chris Healy.
16) Get rid of memory leaks in mcs7780 IRDA driver, from Alexey
Khoroshilov.
17) Netfilter conntrack extensions were converted to RCU but
are not always freed properly using kfree_rcu(). Fix
from Michal Kubecek.
18) VF reset recovery not being done correctly in qlcnic driver,
from Manish Chopra.
19) Fix inverted test in ATM nicstar driver, from Andy Shevchenko.
20) Missing workqueue destroy in cxgb4 error handling, from Wei Yang.
21) Internal switch not initialized properly in bgmac driver, from
Rafał Miłecki.
22) Netlink messages report wrong local and remote addresses in
IPv6 tunneling, from Ding Zhi.
23) ICMP redirects should not generate socket errors in DCCP and
SCTP. We're still working out how this should be handled
for RAW and UDP sockets. From Daniel Borkmann and Duan Jiong.
24) We've had several bugs wherein the network namespace's loopback
device gets accessed after it is free'd, NULL it out so that we
can catch these problems more readily. From Eric W. Biederman.
25) Fix regression in TCP RTO calculations, from Neal Cardwell.
26) Fix too early free of xen-netback network device when VIFs
still exist. From Paul Durrant.
Please pull, thanks a lot.
The following changes since commit d5d04bb48f0eb89c14e76779bb46212494de0bec:
Bye, bye, WfW flag (2013-09-11 19:55:12 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git master
for you to fetch changes up to c71380ff0b199f1e8be5ca46dd91262f7fbe4cb4:
netconsole: fix a deadlock with rtnl and netconsole's mutex (2013-09-19 14:15:53 -0400)
----------------------------------------------------------------
Alexey Khoroshilov (2):
rtl8187: fix use after free on failure path in rtl8187_init_urbs()
net/irda/mcs7780: fix memory leaks in mcs_net_open()
Andy Shevchenko (1):
atm: nicstar: fix regression made by previous patch
Ansis Atteka (2):
ip: use ip_hdr() in __ip_make_skb() to retrieve IP header
ip: generate unique IP identificator if local fragmentation is allowed
Antonio Alecrim Jr (2):
be2net: missing variable initialization
isdn: hfcpci_softirq: get func return to suppress compiler warning
Antonio Quartulli (1):
batman-adv: set the TAG flag for the vid passed to BLA
Arend van Spriel (1):
brcmfmac: fix bus interface selection in Kconfig
Avinash Kumar (1):
drivers: net: phy: cicada.c: clears warning Use #include <linux/io.h> instead of <asm/io.h>
Ben Hutchings (5):
sfc: Minimal support for 40G link speed
sfc: Disable PTP on EF10 until we're ready to handle inline RX timestamps
sfc: Reset derived rx_bad_bytes statistic when EF10 MC is rebooted
sfc: Clean up validation of datapath capabilities
sfc: Reinitialise and re-validate datapath caps after MC reboot
Carolyn Wyborny (1):
igb: Add additional get_phy_id call for i354 devices
Chris Healy (1):
resubmit bridge: fix message_age_timer calculation
Daniel Borkmann (2):
net: sctp: fix ipv6 ipsec encryption bug in sctp_v6_xmit
net: sctp: rfc4443: do not report ICMP redirects to user space
David Ertman (2):
e1000e: cleanup boolean comparison to true
e1000e: fix overrun of PHY RAR array
David S. Miller (5):
Merge tag 'master-2013-09-09' of git://git.kernel.org/.../linville/wireless
Merge branch 'master' of git://git.kernel.org/.../jkirsher/net
Merge branch 'sfc-3.12' of git://git.kernel.org/.../bwh/sfc
Merge branch 'master' of git://git.kernel.org/.../pablo/nf
Merge tag 'batman-adv-fix-for-davem' of git://git.open-mesh.org/linux-merge
David Vrabel (1):
xen-netback: count number required slots for an skb more carefully
Ding Zhi (1):
ip6_tunnels: raddr and laddr are inverted in nl msg
Duan Jiong (1):
net:dccp: do not report ICMP redirects to user space
Emil Tantilov (3):
ixgbe: fix ethtool loopback diagnostic with DCB enabled
ixgbe: limit setting speed to only one at a time for QSFP modules
ixgbe: fix ethtool reporting of supported links for SFP modules
Eric W. Biederman (1):
net loopback: Set loopback_dev to NULL when freed
Eugenia Emantayev (1):
net/mlx4_en: Check device state when setting coalescing
Fabio Porcedda (3):
net: usb: cdc_ether: Use wwan interface for Telit modules
net: usb: cdc_ether: fix checkpatch errors and warnings
net: usb: cdc_ether: use usb.h macros whenever possible
Fujinaka, Todd (1):
igb: Read flow control for i350 from correct EEPROM section
Gao feng (1):
netfilter: nfnetlink_queue: use network skb for sequence adjustment
Hauke Mehrtens (2):
bcma: fix error code handling on 64 Bit systems
bgmac: allow bigger et_swtype nvram variable
Herbert Xu (1):
bridge: Clamp forward_delay when enabling STP
Hong Zhiguo (2):
bridge: use br_port_get_rtnl within rtnl lock
bridge: fix NULL pointer deref of br_port_get_rcu
Jacob Keller (1):
ixgbe: fully disable hardware RSC logic when disabling RSC
Jason Wang (1):
tuntap: correctly handle error in tun_set_iff()
Jon Mason (2):
bnx2x: Use pci_dev pm_cap
tg3: Use pci_dev pm_cap
Joseph Gasparakis (1):
vxlan: Fix sparse warnings
Jozsef Kadlecsik (3):
netfilter: ipset: Skip really non-first fragments for IPv6 when getting port/protocol
netfilter: ipset: Consistent userspace testing with nomatch flag
netfilter: ipset: Validate the set family and not the set type family at swapping
Kees Cook (2):
xen-netback: fix possible format string flaw
isdn: clean up debug format string usage
Libo Chen (1):
drivers/atm/he.c: convert to module_pci_driver
Manish Chopra (1):
qlcnic: Fix VF reset recovery
Michael Chan (2):
bnx2x, cnic, bnx2i, bnx2fc: Fix bnx2i and bnx2fc regressions.
cnic: Fix crash in cnic_bnx2x_service_kcq()
Michael Opdenacker (13):
bfin_mac: remove deprecated IRQF_DISABLED
ehea: remove deprecated IRQF_DISABLED
ethernet: amd: remove deprecated IRQF_DISABLED
net: tulip: remove deprecated IRQF_DISABLED
net: fec: remove deprecated IRQF_DISABLED
net: hp100: remove deprecated IRQF_DISABLED
net: lantiq_etop: remove deprecated IRQF_DISABLED
net: pxa168_eth: remove deprecated IRQF_DISABLED
net: ks8851-ml: remove deprecated IRQF_DISABLED
net: natsemi: remove deprecated IRQF_DISABLED
net: pasemi: remove deprecated IRQF_DISABLED
net: smsc: remove deprecated IRQF_DISABLED
net: ps3_gelic: remove deprecated IRQF_DISABLED
Michal Kubeček (1):
netfilter: nf_conntrack: use RCU safe kfree for conntrack extensions
Mikulas Patocka (1):
skge: fix broken driver
Neal Cardwell (1):
tcp: fix RTO calculated from cached RTT
Neil Horman (1):
bonding: Make alb learning packet interval configurable
Nikolay Aleksandrov (2):
netpoll: fix NULL pointer dereference in netpoll_cleanup
netconsole: fix a deadlock with rtnl and netconsole's mutex
Nithin Sujir (1):
tg3: Expand led off fix to include 5720
Olaf Hering (1):
drivers/net/ethernet/ibm/ehea/ehea_main.c: add alias entry for portN properties
Oliver Smith (1):
netfilter: ipset: Fix serious failure in CIDR tracking
Paul Durrant (1):
xen-netback: Don't destroy the netdev until the vif is shut down
Phil Oester (1):
netfilter: nf_nat_proto_icmpv6:: fix wrong comparison in icmpv6_manip_pkt
Rafał Miłecki (2):
bgmac: fix internal switch initialization
bgmac: implement unaligned addressing for DMA rings that support it
Solomon Peachy (2):
cw1200: Don't perform SPI transfers in interrupt context
cw1200: Prevent a lock-related hang in the cw1200_spi driver
Sonic Zhang (1):
netpoll: Should handle ETH_P_ARP other than ETH_P_IP in netpoll_neigh_reply
Sridhar Samudrala (1):
vxlan: Avoid creating fdb entry with NULL destination
Stanislaw Gruszka (1):
rt2800: change initialization sequence to fix system freeze
Wei Yang (1):
cxgb4: remove workqueue when driver registration fails
Yijing Wang (1):
alx: remove redundant D0 power state set
françois romieu (1):
r8169: enforce RX_MULTI_EN for the 8168f.
Documentation/networking/bonding.txt | 6 +++
drivers/atm/he.c | 13 +-----
drivers/atm/nicstar.c | 2 +-
drivers/bcma/scan.c | 12 +++---
drivers/isdn/hardware/mISDN/hfcpci.c | 4 +-
drivers/isdn/hisax/amd7930_fn.c | 4 +-
drivers/isdn/hisax/avm_pci.c | 4 +-
drivers/isdn/hisax/config.c | 2 +-
drivers/isdn/hisax/diva.c | 4 +-
drivers/isdn/hisax/elsa.c | 2 +-
drivers/isdn/hisax/elsa_ser.c | 2 +-
drivers/isdn/hisax/hfc_pci.c | 2 +-
drivers/isdn/hisax/hfc_sx.c | 2 +-
drivers/isdn/hisax/hscx_irq.c | 4 +-
drivers/isdn/hisax/icc.c | 4 +-
drivers/isdn/hisax/ipacx.c | 8 ++--
drivers/isdn/hisax/isac.c | 4 +-
drivers/isdn/hisax/isar.c | 6 +--
drivers/isdn/hisax/jade.c | 18 +++------
drivers/isdn/hisax/jade_irq.c | 4 +-
drivers/isdn/hisax/l3_1tr6.c | 50 +++++++++---------------
drivers/isdn/hisax/netjet.c | 2 +-
drivers/isdn/hisax/q931.c | 6 +--
drivers/isdn/hisax/w6692.c | 8 ++--
drivers/net/bonding/bond_alb.c | 2 +-
drivers/net/bonding/bond_alb.h | 9 +++--
drivers/net/bonding/bond_main.c | 1 +
drivers/net/bonding/bond_sysfs.c | 39 ++++++++++++++++++
drivers/net/bonding/bonding.h | 1 +
drivers/net/ethernet/adi/bfin_mac.c | 4 +-
drivers/net/ethernet/amd/sun3lance.c | 2 +-
drivers/net/ethernet/atheros/alx/main.c | 9 +----
drivers/net/ethernet/broadcom/bgmac.c | 44 +++++++++++++++------
drivers/net/ethernet/broadcom/bgmac.h | 4 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x.h | 37 ++++++++++++++++--
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 8 ++--
drivers/net/ethernet/broadcom/bnx2x/bnx2x_ethtool.c | 4 +-
drivers/net/ethernet/broadcom/bnx2x/bnx2x_main.c | 14 ++++---
drivers/net/ethernet/broadcom/cnic.c | 6 ++-
drivers/net/ethernet/broadcom/tg3.c | 6 +--
drivers/net/ethernet/broadcom/tg3.h | 1 -
drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 4 +-
drivers/net/ethernet/dec/tulip/de4x5.c | 2 +-
drivers/net/ethernet/emulex/benet/be_main.c | 2 +-
drivers/net/ethernet/freescale/fec_main.c | 2 +-
drivers/net/ethernet/hp/hp100.c | 2 +-
drivers/net/ethernet/ibm/ehea/ehea_main.c | 21 +++++++---
drivers/net/ethernet/intel/e1000e/ethtool.c | 8 ++++
drivers/net/ethernet/intel/e1000e/ich8lan.c | 13 +++---
drivers/net/ethernet/intel/e1000e/ich8lan.h | 2 +-
drivers/net/ethernet/intel/e1000e/netdev.c | 2 +-
drivers/net/ethernet/intel/igb/e1000_82575.c | 4 ++
drivers/net/ethernet/intel/igb/e1000_mac.c | 10 ++++-
drivers/net/ethernet/intel/ixgbe/ixgbe_ethtool.c | 25 ++++++++++++
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 19 ++++++++-
drivers/net/ethernet/intel/ixgbe/ixgbe_type.h | 1 +
drivers/net/ethernet/lantiq_etop.c | 6 +--
drivers/net/ethernet/marvell/pxa168_eth.c | 3 +-
drivers/net/ethernet/marvell/skge.c | 5 ++-
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 16 +++++---
drivers/net/ethernet/micrel/ks8851_mll.c | 2 +-
drivers/net/ethernet/natsemi/jazzsonic.c | 3 +-
drivers/net/ethernet/natsemi/xtsonic.c | 3 +-
drivers/net/ethernet/pasemi/pasemi_mac.c | 4 +-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 1 +
drivers/net/ethernet/realtek/r8169.c | 1 +
drivers/net/ethernet/sfc/Kconfig | 2 +-
drivers/net/ethernet/sfc/ef10.c | 58 +++++++++++++++++----------
drivers/net/ethernet/sfc/mcdi_port.c | 2 +
drivers/net/ethernet/sfc/nic.h | 3 ++
drivers/net/ethernet/smsc/smc91x.h | 2 +-
drivers/net/ethernet/smsc/smsc9420.c | 3 +-
drivers/net/ethernet/toshiba/ps3_gelic_net.c | 2 +-
drivers/net/irda/mcs7780.c | 40 +++++++++++--------
drivers/net/loopback.c | 1 +
drivers/net/netconsole.c | 5 +--
drivers/net/phy/cicada.c | 4 +-
drivers/net/ppp/pptp.c | 2 +-
drivers/net/tun.c | 11 ++++--
drivers/net/usb/cdc_ether.c | 115 ++++++++++++++++++++----------------------------------
drivers/net/vxlan.c | 40 ++++++++++---------
drivers/net/wireless/brcm80211/Kconfig | 4 +-
drivers/net/wireless/cw1200/cw1200_spi.c | 28 +++++++++++--
drivers/net/wireless/cw1200/fwio.c | 2 +-
drivers/net/wireless/cw1200/hwbus.h | 1 +
drivers/net/wireless/cw1200/hwio.c | 15 +++++++
drivers/net/wireless/rt2x00/rt2800lib.c | 11 +++---
drivers/net/wireless/rtl818x/rtl8187/dev.c | 15 ++++---
drivers/net/xen-netback/common.h | 1 +
drivers/net/xen-netback/interface.c | 28 ++++++-------
drivers/net/xen-netback/netback.c | 94 ++++++++++++++++++++++++++++++--------------
drivers/net/xen-netback/xenbus.c | 17 +++++---
drivers/scsi/bnx2fc/bnx2fc.h | 2 +-
drivers/scsi/bnx2fc/bnx2fc_hwi.c | 3 +-
drivers/scsi/bnx2i/bnx2i.h | 2 +-
drivers/scsi/bnx2i/bnx2i_hwi.c | 3 +-
include/linux/netdevice.h | 8 ++--
include/linux/netfilter/ipset/ip_set.h | 6 ++-
include/net/ip.h | 12 ++++--
include/net/netfilter/nf_conntrack_extend.h | 2 +-
net/batman-adv/soft-interface.c | 2 +
net/bridge/br_netlink.c | 4 +-
net/bridge/br_private.h | 8 ++--
net/bridge/br_stp.c | 23 +++++++----
net/bridge/br_stp_if.c | 12 +++++-
net/core/netpoll.c | 11 +++---
net/dccp/ipv6.c | 1 +
net/ipv4/igmp.c | 4 +-
net/ipv4/inetpeer.c | 4 +-
net/ipv4/ip_output.c | 8 ++--
net/ipv4/ipmr.c | 2 +-
net/ipv4/raw.c | 2 +-
net/ipv4/tcp_metrics.c | 4 +-
net/ipv4/xfrm4_mode_tunnel.c | 2 +-
net/ipv6/ip6_tunnel.c | 4 +-
net/ipv6/netfilter/nf_nat_proto_icmpv6.c | 4 +-
net/netfilter/ipset/ip_set_core.c | 5 +--
net/netfilter/ipset/ip_set_getport.c | 4 +-
net/netfilter/ipset/ip_set_hash_gen.h | 28 +++++++------
net/netfilter/ipset/ip_set_hash_ipportnet.c | 4 +-
net/netfilter/ipset/ip_set_hash_net.c | 4 +-
net/netfilter/ipset/ip_set_hash_netiface.c | 4 +-
net/netfilter/ipset/ip_set_hash_netport.c | 4 +-
net/netfilter/ipvs/ip_vs_xmit.c | 2 +-
net/netfilter/nfnetlink_queue_core.c | 2 +-
net/sctp/input.c | 3 +-
net/sctp/ipv6.c | 44 +++++++--------------
127 files changed, 751 insertions(+), 517 deletions(-)
^ permalink raw reply
* [PATCH] stable_kernel_rules.txt: Exclude networking from stable rules
From: Joe Perches @ 2013-09-19 18:31 UTC (permalink / raw)
To: David Miller
Cc: stephen, netdev, Mikulas Patocka, Greg Kroah-Hartman, Rob Landley,
linux-doc, LKML
In-Reply-To: <alpine.LRH.2.02.1309191359300.12162@file01.intranet.prod.int.rdu2.redhat.com>
Networking is once again "special", so at least document
how it's working today in the hope that doing so makes
less work for all that actually read the documentation.
Signed-off-by: Joe Perches <joe@perches.com>
---
On Thu, 19 Sep 2013, David Miller wrote:
> Secondly, CC:'ing stable is not the correct way to submit networking
> patches for -stable inclusion. You simply ask me to queue them up
> for -stable explicitly instead.
Documentation/stable_kernel_rules.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/Documentation/stable_kernel_rules.txt b/Documentation/stable_kernel_rules.txt
index b0714d8..a2d6da0 100644
--- a/Documentation/stable_kernel_rules.txt
+++ b/Documentation/stable_kernel_rules.txt
@@ -29,6 +29,11 @@ Rules on what kind of patches are accepted, and which ones are not, into the
Procedure for submitting patches to the -stable tree:
+ - The networking tree (net/ and drivers/net/) is 'special' and doesn't
+ follow the rules below. Don't send or cc: patches for the -stable tree to
+ stable@vger.kernel.org. Don't mark them stable. Just send the patches to
+ netdev@vger.kernel.org and let the networking maintainer decide what to do
+ with them.
- Send the patch, after verifying that it follows the above rules, to
stable@vger.kernel.org. You must note the upstream commit ID in the
changelog of your submission, as well as the kernel version you wish
^ permalink raw reply related
* Re: [PATCH] skge: fix broken driver
From: Mikulas Patocka @ 2013-09-19 18:29 UTC (permalink / raw)
To: Igor Gnatenko; +Cc: David Miller, stephen, netdev
In-Reply-To: <1379614608.2331.0.camel@ThinkPad-X230.localdomain>
On Thu, 19 Sep 2013, Igor Gnatenko wrote:
> On Thu, 2013-09-19 at 14:04 -0400, Mikulas Patocka wrote:
> >
> >
> > On Thu, 19 Sep 2013, David Miller wrote:
> >
> > > From: Mikulas Patocka <mpatocka@redhat.com>
> > > Date: Thu, 19 Sep 2013 12:33:30 -0400 (EDT)
> > >
> > > > Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> > > > Cc: stable@kernel.org # 3.11
> > >
> > > First, this is missing the reported-by and tested-by tags provided
> > > by people who tested this patch.
> >
> > I noticed the problem and tested the patch on my own machine. So I added
> > myself to these tags.
> >
> > > Secondly, CC:'ing stable is not the correct way to submit networking
> > > patches for -stable inclusion. You simply ask me to queue them up
> > > for -stable explicitly instead.
> > >
> > > Please re-submit this with the currect signoffs, thank you.
> >
> > Here I'm re-submitting it.
> >
> > ---
> >
> > skge: fix broken driver
> >
> > The patch 136d8f377e1575463b47840bc5f1b22d94bf8f63 broke the skge driver.
> > Note this part of the patch:
> > + if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
> > + dev_kfree_skb(nskb);
> > + goto resubmit;
> > + }
> > +
> > pci_unmap_single(skge->hw->pdev,
> > dma_unmap_addr(e, mapaddr),
> > dma_unmap_len(e, maplen),
> > PCI_DMA_FROMDEVICE);
> > skb = e->skb;
> > prefetch(skb->data);
> > - skge_rx_setup(skge, e, nskb, skge->rx_buf_size);
> >
> > The function skge_rx_setup modifies e->skb to point to the new skb. Thus,
> > after this change, the new buffer, not the old, is returned to the
> > networking stack.
> >
> > This bug is present in kernels 3.11, 3.11.1 and 3.12-rc1. The patch should
> > be queued for 3.11-stable.
> >
> > Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> > Reported-by: Mikulas Patocka <mpatocka@redhat.com>
> > Tested-by: Mikulas Patocka <mpatocka@redhat.com>
> >
> > ---
> > drivers/net/ethernet/marvell/skge.c | 5 +++--
> > 1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > Index: linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c
> > ===================================================================
> > --- linux-3.11.1-fast.orig/drivers/net/ethernet/marvell/skge.c 2013-09-10 19:46:58.000000000 +0200
> > +++ linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c 2013-09-19 18:20:43.000000000 +0200
> > @@ -3092,6 +3092,9 @@ static struct sk_buff *skge_rx_get(struc
> > if (!nskb)
> > goto resubmit;
> >
> > + skb = e->skb;
> > + prefetch(skb->data);
> > +
> > if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
> > dev_kfree_skb(nskb);
> > goto resubmit;
> > @@ -3101,8 +3104,6 @@ static struct sk_buff *skge_rx_get(struc
> > dma_unmap_addr(e, mapaddr),
> > dma_unmap_len(e, maplen),
> > PCI_DMA_FROMDEVICE);
> > - skb = e->skb;
> > - prefetch(skb->data);
> > }
> >
> > skb_put(skb, len);
> > --
> > To unsubscribe from this list: send the line "unsubscribe netdev" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> Hey Mikulas! See https://lkml.org/lkml/2013/9/19/38 , plz.
> --
> Igor Gnatenko
> Fedora release 20 (Heisenbug)
> Linux 3.11.1-300.fc20.x86_64
I see. My patch is a bit simpler - it doesn't allocate the structure
skge_element on the stack.
Mikulas
^ permalink raw reply
* Re: [PATCH -net v2 0/2] net: netpoll and netconsole fixes
From: David Miller @ 2013-09-19 18:16 UTC (permalink / raw)
To: nikolay; +Cc: netdev
In-Reply-To: <1379595756-3527-1-git-send-email-nikolay@redhat.com>
From: Nikolay Aleksandrov <nikolay@redhat.com>
Date: Thu, 19 Sep 2013 15:02:34 +0200
> This small patchset fixes a possible race condition in netpoll_cleanup
> which can lead to a NULL pointer dereference because the check and
> manipulation of np->dev are done outside of the rtnl lock (patch 01).
> The second patch fixes a deadlock in netconsole and does a trivial comment
> style fix.
Both applied and queued up for -stable, thanks.
^ permalink raw reply
* Re: [PATCH] skge: fix broken driver
From: Igor Gnatenko @ 2013-09-19 18:16 UTC (permalink / raw)
To: Mikulas Patocka; +Cc: David Miller, stephen, netdev
In-Reply-To: <alpine.LRH.2.02.1309191359300.12162@file01.intranet.prod.int.rdu2.redhat.com>
On Thu, 2013-09-19 at 14:04 -0400, Mikulas Patocka wrote:
>
>
> On Thu, 19 Sep 2013, David Miller wrote:
>
> > From: Mikulas Patocka <mpatocka@redhat.com>
> > Date: Thu, 19 Sep 2013 12:33:30 -0400 (EDT)
> >
> > > Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> > > Cc: stable@kernel.org # 3.11
> >
> > First, this is missing the reported-by and tested-by tags provided
> > by people who tested this patch.
>
> I noticed the problem and tested the patch on my own machine. So I added
> myself to these tags.
>
> > Secondly, CC:'ing stable is not the correct way to submit networking
> > patches for -stable inclusion. You simply ask me to queue them up
> > for -stable explicitly instead.
> >
> > Please re-submit this with the currect signoffs, thank you.
>
> Here I'm re-submitting it.
>
> ---
>
> skge: fix broken driver
>
> The patch 136d8f377e1575463b47840bc5f1b22d94bf8f63 broke the skge driver.
> Note this part of the patch:
> + if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
> + dev_kfree_skb(nskb);
> + goto resubmit;
> + }
> +
> pci_unmap_single(skge->hw->pdev,
> dma_unmap_addr(e, mapaddr),
> dma_unmap_len(e, maplen),
> PCI_DMA_FROMDEVICE);
> skb = e->skb;
> prefetch(skb->data);
> - skge_rx_setup(skge, e, nskb, skge->rx_buf_size);
>
> The function skge_rx_setup modifies e->skb to point to the new skb. Thus,
> after this change, the new buffer, not the old, is returned to the
> networking stack.
>
> This bug is present in kernels 3.11, 3.11.1 and 3.12-rc1. The patch should
> be queued for 3.11-stable.
>
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> Reported-by: Mikulas Patocka <mpatocka@redhat.com>
> Tested-by: Mikulas Patocka <mpatocka@redhat.com>
>
> ---
> drivers/net/ethernet/marvell/skge.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> Index: linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c
> ===================================================================
> --- linux-3.11.1-fast.orig/drivers/net/ethernet/marvell/skge.c 2013-09-10 19:46:58.000000000 +0200
> +++ linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c 2013-09-19 18:20:43.000000000 +0200
> @@ -3092,6 +3092,9 @@ static struct sk_buff *skge_rx_get(struc
> if (!nskb)
> goto resubmit;
>
> + skb = e->skb;
> + prefetch(skb->data);
> +
> if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
> dev_kfree_skb(nskb);
> goto resubmit;
> @@ -3101,8 +3104,6 @@ static struct sk_buff *skge_rx_get(struc
> dma_unmap_addr(e, mapaddr),
> dma_unmap_len(e, maplen),
> PCI_DMA_FROMDEVICE);
> - skb = e->skb;
> - prefetch(skb->data);
> }
>
> skb_put(skb, len);
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
Hey Mikulas! See https://lkml.org/lkml/2013/9/19/38 , plz.
--
Igor Gnatenko
Fedora release 20 (Heisenbug)
Linux 3.11.1-300.fc20.x86_64
^ permalink raw reply
* Re: [PATCH v2] skge: fix broken driver
From: David Miller @ 2013-09-19 18:15 UTC (permalink / raw)
To: mpatocka; +Cc: stephen, netdev, vascom2
In-Reply-To: <alpine.LRH.2.02.1309191409301.12162@file01.intranet.prod.int.rdu2.redhat.com>
From: Mikulas Patocka <mpatocka@redhat.com>
Date: Thu, 19 Sep 2013 14:13:17 -0400 (EDT)
> The patch 136d8f377e1575463b47840bc5f1b22d94bf8f63 broke the skge driver.
> Note this part of the patch:
> + if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
> + dev_kfree_skb(nskb);
> + goto resubmit;
> + }
> +
> pci_unmap_single(skge->hw->pdev,
> dma_unmap_addr(e, mapaddr),
> dma_unmap_len(e, maplen),
> PCI_DMA_FROMDEVICE);
> skb = e->skb;
> prefetch(skb->data);
> - skge_rx_setup(skge, e, nskb, skge->rx_buf_size);
>
> The function skge_rx_setup modifies e->skb to point to the new skb. Thus,
> after this change, the new buffer, not the old, is returned to the
> networking stack.
>
> This bug is present in kernels 3.11, 3.11.1 and 3.12-rc1. The patch should
> be queued for 3.11-stable.
>
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> Reported-by: Mikulas Patocka <mpatocka@redhat.com>
> Reported-by: Vasiliy Glazov <vascom2@gmail.com>
> Tested-by: Mikulas Patocka <mpatocka@redhat.com>
Applied and queued up for -stable, thanks.
^ permalink raw reply
* [PATCH v2] skge: fix broken driver
From: Mikulas Patocka @ 2013-09-19 18:13 UTC (permalink / raw)
To: David Miller; +Cc: stephen, netdev, Vasiliy Glazov
The patch 136d8f377e1575463b47840bc5f1b22d94bf8f63 broke the skge driver.
Note this part of the patch:
+ if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
+ dev_kfree_skb(nskb);
+ goto resubmit;
+ }
+
pci_unmap_single(skge->hw->pdev,
dma_unmap_addr(e, mapaddr),
dma_unmap_len(e, maplen),
PCI_DMA_FROMDEVICE);
skb = e->skb;
prefetch(skb->data);
- skge_rx_setup(skge, e, nskb, skge->rx_buf_size);
The function skge_rx_setup modifies e->skb to point to the new skb. Thus,
after this change, the new buffer, not the old, is returned to the
networking stack.
This bug is present in kernels 3.11, 3.11.1 and 3.12-rc1. The patch should
be queued for 3.11-stable.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Vasiliy Glazov <vascom2@gmail.com>
Tested-by: Mikulas Patocka <mpatocka@redhat.com>
---
drivers/net/ethernet/marvell/skge.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c
===================================================================
--- linux-3.11.1-fast.orig/drivers/net/ethernet/marvell/skge.c 2013-09-10 19:46:58.000000000 +0200
+++ linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c 2013-09-19 18:20:43.000000000 +0200
@@ -3092,6 +3092,9 @@ static struct sk_buff *skge_rx_get(struc
if (!nskb)
goto resubmit;
+ skb = e->skb;
+ prefetch(skb->data);
+
if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
dev_kfree_skb(nskb);
goto resubmit;
@@ -3101,8 +3104,6 @@ static struct sk_buff *skge_rx_get(struc
dma_unmap_addr(e, mapaddr),
dma_unmap_len(e, maplen),
PCI_DMA_FROMDEVICE);
- skb = e->skb;
- prefetch(skb->data);
}
skb_put(skb, len);
^ permalink raw reply
* Re: [PATCH net v2 2/2] ip: generate unique IP identificator if local fragmentation is allowed
From: David Miller @ 2013-09-19 18:11 UTC (permalink / raw)
To: aatteka; +Cc: netdev
In-Reply-To: <1379543393-7446-2-git-send-email-aatteka@nicira.com>
From: Ansis Atteka <aatteka@nicira.com>
Date: Wed, 18 Sep 2013 15:29:53 -0700
> If local fragmentation is allowed, then ip_select_ident() and
> ip_select_ident_more() need to generate unique IDs to ensure
> correct defragmentation on the peer.
>
> For example, if IPsec (tunnel mode) has to encrypt large skbs
> that have local_df bit set, then all IP fragments that belonged
> to different ESP datagrams would have used the same identificator.
> If one of these IP fragments would get lost or reordered, then
> peer could possibly stitch together wrong IP fragments that did
> not belong to the same datagram. This would lead to a packet loss
> or data corruption.
>
> Signed-off-by: Ansis Atteka <aatteka@nicira.com>
Applied.
^ permalink raw reply
* Re: [PATCH net v2 1/2] ip: use ip_hdr() in __ip_make_skb() to retrieve IP header
From: David Miller @ 2013-09-19 18:11 UTC (permalink / raw)
To: aatteka; +Cc: netdev
In-Reply-To: <1379543393-7446-1-git-send-email-aatteka@nicira.com>
From: Ansis Atteka <aatteka@nicira.com>
Date: Wed, 18 Sep 2013 15:29:52 -0700
> skb->data already points to IP header, but for the sake of
> consistency we can also use ip_hdr() to retrieve it.
>
> Signed-off-by: Ansis Atteka <aatteka@nicira.com>
Applied.
^ permalink raw reply
* Re: [PATCH] phy/micrel: Add suspend/resume support to Micrel PHYs
From: David Miller @ 2013-09-19 18:08 UTC (permalink / raw)
To: nicolas.ferre
Cc: netdev, b.brezillon, f.fainelli, linux-kernel, linux-arm-kernel,
patrice.vilchez, david.choi
In-Reply-To: <1379612448-20805-1-git-send-email-nicolas.ferre@atmel.com>
From: Nicolas Ferre <nicolas.ferre@atmel.com>
Date: Thu, 19 Sep 2013 19:40:48 +0200
> From: Patrice Vilchez <patrice.vilchez@atmel.com>
>
> All supported Micrel PHYs implement the standard "power down" bit 11 of BMCR,
> so this patch adds support using the generic genphy_{suspend,resume} functions.
>
> Signed-off-by: Patrice Vilchez <patrice.vilchez@atmel.com>
> [b.brezillon@overkiz.com: adapt to newer kernel and generalize to other phys]
> Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
> [nicolas.ferre@atmel.com: commit message modification]
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> Cc: David J. Choi <david.choi@micrel.com>
What's the difference between this patch and the one you sent 60
seconds beforehand?
^ permalink raw reply
* Re: [PATCH] skge: fix broken driver
From: David Miller @ 2013-09-19 18:07 UTC (permalink / raw)
To: mpatocka; +Cc: stephen, netdev
In-Reply-To: <alpine.LRH.2.02.1309191359300.12162@file01.intranet.prod.int.rdu2.redhat.com>
From: Mikulas Patocka <mpatocka@redhat.com>
Date: Thu, 19 Sep 2013 14:04:38 -0400 (EDT)
> Here I'm re-submitting it.
Please do not hijack an existing discussions to resubmit the patch.
Instead, make a fresh, completely new, mailing list posting for the
patch submissions.
Thank you.
^ permalink raw reply
* Re: [PATCH net-next v4] Don't destroy the netdev until the vif is shut down
From: David Miller @ 2013-09-19 18:05 UTC (permalink / raw)
To: paul.durrant; +Cc: xen-devel, netdev, david.vrabel, wei.liu2, ian.campbell
In-Reply-To: <1379436368-6882-1-git-send-email-paul.durrant@citrix.com>
From: Paul Durrant <paul.durrant@citrix.com>
Date: Tue, 17 Sep 2013 17:46:08 +0100
> Without this patch, if a frontend cycles through states Closing
> and Closed (which Windows frontends need to do) then the netdev
> will be destroyed and requires re-invocation of hotplug scripts
> to restore state before the frontend can move to Connected. Thus
> when udev is not in use the backend gets stuck in InitWait.
>
> With this patch, the netdev is left alone whilst the backend is
> still online and is only de-registered and freed just prior to
> destroying the vif (which is also nicely symmetrical with the
> netdev allocation and registration being done during probe) so
> no re-invocation of hotplug scripts is required.
>
> Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
I think all of the testing requests have been satisfied so I have
applied this.
But _please_ write a more proper subject line in future patch
submissions. You have to provide a subsystem prefix in the
subject line, here I added "xen-netback: ", otherwise someone
skimming the shortlog has no idea what area of code this change
touches.
Thanks.
^ permalink raw reply
* Re: [PATCH] skge: fix broken driver
From: Mikulas Patocka @ 2013-09-19 18:04 UTC (permalink / raw)
To: David Miller; +Cc: stephen, netdev
In-Reply-To: <20130919.135628.1201613770803318193.davem@davemloft.net>
On Thu, 19 Sep 2013, David Miller wrote:
> From: Mikulas Patocka <mpatocka@redhat.com>
> Date: Thu, 19 Sep 2013 12:33:30 -0400 (EDT)
>
> > Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> > Cc: stable@kernel.org # 3.11
>
> First, this is missing the reported-by and tested-by tags provided
> by people who tested this patch.
I noticed the problem and tested the patch on my own machine. So I added
myself to these tags.
> Secondly, CC:'ing stable is not the correct way to submit networking
> patches for -stable inclusion. You simply ask me to queue them up
> for -stable explicitly instead.
>
> Please re-submit this with the currect signoffs, thank you.
Here I'm re-submitting it.
---
skge: fix broken driver
The patch 136d8f377e1575463b47840bc5f1b22d94bf8f63 broke the skge driver.
Note this part of the patch:
+ if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
+ dev_kfree_skb(nskb);
+ goto resubmit;
+ }
+
pci_unmap_single(skge->hw->pdev,
dma_unmap_addr(e, mapaddr),
dma_unmap_len(e, maplen),
PCI_DMA_FROMDEVICE);
skb = e->skb;
prefetch(skb->data);
- skge_rx_setup(skge, e, nskb, skge->rx_buf_size);
The function skge_rx_setup modifies e->skb to point to the new skb. Thus,
after this change, the new buffer, not the old, is returned to the
networking stack.
This bug is present in kernels 3.11, 3.11.1 and 3.12-rc1. The patch should
be queued for 3.11-stable.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Mikulas Patocka <mpatocka@redhat.com>
Tested-by: Mikulas Patocka <mpatocka@redhat.com>
---
drivers/net/ethernet/marvell/skge.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c
===================================================================
--- linux-3.11.1-fast.orig/drivers/net/ethernet/marvell/skge.c 2013-09-10 19:46:58.000000000 +0200
+++ linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c 2013-09-19 18:20:43.000000000 +0200
@@ -3092,6 +3092,9 @@ static struct sk_buff *skge_rx_get(struc
if (!nskb)
goto resubmit;
+ skb = e->skb;
+ prefetch(skb->data);
+
if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
dev_kfree_skb(nskb);
goto resubmit;
@@ -3101,8 +3104,6 @@ static struct sk_buff *skge_rx_get(struc
dma_unmap_addr(e, mapaddr),
dma_unmap_len(e, maplen),
PCI_DMA_FROMDEVICE);
- skb = e->skb;
- prefetch(skb->data);
}
skb_put(skb, len);
^ permalink raw reply
* Re: [PATCH ] ipv6: handle the update of the NDISC_REDIRECT error code in icmpv6_err_convert
From: David Miller @ 2013-09-19 18:02 UTC (permalink / raw)
To: djduanjiong; +Cc: duanj.fnst, netdev
In-Reply-To: <523A8A74.30005@gmail.com>
From: Duan Jiong <djduanjiong@gmail.com>
Date: Thu, 19 Sep 2013 13:24:04 +0800
> 于 2013/9/19 0:36, David Miller 写道:
>> From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
>> Date: Wed, 18 Sep 2013 20:04:48 +0800
>>
>>> From: Duan Jiong <duanj.fnst@cn.fujitsu.com>
>>>
>>> when dealing with redirect message in udpv6_err() and
>>> rawv6_err() the err shoud be assigned to 0, not EPROTO.
>>>
>>> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
>> No, you should fix this the same way you handled DCCP, but skipping
>> the whole socket error setting path for NDISC_REDIRECT.
>
> Your meaning is that we should return directly after calling
> ip6_sk_redirect(), is that it?
It depends upon whether udp/raw sockets are expected to receive redirect
notifications this way, are they? You seem to believe so.
^ permalink raw reply
* Re: [PATCH v2] ip6tnl: do route updating for redirect in ip6_tnl_err()
From: David Miller @ 2013-09-19 18:02 UTC (permalink / raw)
To: djduanjiong; +Cc: netdev, duanj.fnst
In-Reply-To: <1379474877-3097-1-git-send-email-duanj.fnst@cn.fujitsu.com>
From: Duan Jiong <djduanjiong@gmail.com>
Date: Tue, 17 Sep 2013 20:27:57 -0700
> After the ip6_tnl_err() is called, the rel_msg is assigned to
> 0, and the ip4ip6_err() will return directly, the instruction
> below will not be executed.
>
> In rfc2473, we can know that the tunnel ICMP redirect message
> should not be reported to the source of the original packet,
> so we can handle it in ip6_tnl_err().
>
> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
I do not think this change is correct.
> @@ -576,9 +579,6 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
> rel_type = ICMP_DEST_UNREACH;
> rel_code = ICMP_FRAG_NEEDED;
> break;
> - case NDISC_REDIRECT:
> - rel_type = ICMP_REDIRECT;
> - rel_code = ICMP_REDIR_HOST;
> default:
> return 0;
> }
The bug is a missing "break;" statement for this case, and:
> @@ -637,8 +637,6 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
>
> skb_dst(skb2)->ops->update_pmtu(skb_dst(skb2), NULL, skb2, rel_info);
> }
> - if (rel_type == ICMP_REDIRECT)
> - skb_dst(skb2)->ops->redirect(skb_dst(skb2), NULL, skb2);
>
We absolutely must run the ipv4 dst_ops redirect handler here so you must
keep this code around as well.
The only change you need to make is to add the missing break;
statement to ip4ip6_err() and then also add appropriate NDISC_REDIRECT
handling to ip6ip6_err().
^ permalink raw reply
* Re: [PATCH] skge: fix broken driver
From: David Miller @ 2013-09-19 17:56 UTC (permalink / raw)
To: mpatocka; +Cc: stephen, netdev
In-Reply-To: <alpine.LRH.2.02.1309191229480.32035@file01.intranet.prod.int.rdu2.redhat.com>
From: Mikulas Patocka <mpatocka@redhat.com>
Date: Thu, 19 Sep 2013 12:33:30 -0400 (EDT)
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> Cc: stable@kernel.org # 3.11
First, this is missing the reported-by and tested-by tags provided
by people who tested this patch.
Secondly, CC:'ing stable is not the correct way to submit networking
patches for -stable inclusion. You simply ask me to queue them up
for -stable explicitly instead.
Please re-submit this with the currect signoffs, thank you.
^ permalink raw reply
* Re: [PATCH] sfc: Fix efx_rx_buf_offset() for recycled pages
From: David Miller @ 2013-09-19 17:43 UTC (permalink / raw)
To: bhutchings; +Cc: stable, netdev
In-Reply-To: <1379607231.1514.13.camel@bwh-desktop.uk.level5networks.com>
From: Ben Hutchings <bhutchings@solarflare.com>
Date: Thu, 19 Sep 2013 17:13:51 +0100
> This bug fix is only for stable branches older than 3.10. The bug was
> fixed upstream by commit 2768935a4660 ('sfc: reuse pages to avoid DMA
> mapping/unmapping costs'), but that change is totally unsuitable for
> stable.
>
> Commit b590ace09d51 ('sfc: Fix efx_rx_buf_offset() in the presence of
> swiotlb') added an explicit page_offset member to struct
> efx_rx_buffer, which must be set consistently with the u.page and
> dma_addr fields. However, it failed to add the necessary assignment
> in efx_resurrect_rx_buffer(). It also did not correct the calculation
> of efx_rx_buffer::dma_addr in efx_resurrect_rx_buffer(), which assumes
> that DMA-mapping a page will result in a page-aligned DMA address
> (exactly what swiotlb violates).
>
> Add the assignment of efx_rx_buffer::page_offset and change the
> calculation of dma_addr to make use of it.
No objections.
^ permalink raw reply
* [PATCH] phy/micrel: Add suspend/resume support to Micrel PHYs
From: Nicolas Ferre @ 2013-09-19 17:40 UTC (permalink / raw)
To: davem, netdev
Cc: b.brezillon, f.fainelli, linux-kernel, linux-arm-kernel,
Patrice Vilchez, Nicolas Ferre, David J. Choi
From: Patrice Vilchez <patrice.vilchez@atmel.com>
All supported Micrel PHYs implement the standard "power down" bit 11 of BMCR,
so this patch adds support using the generic genphy_{suspend,resume} functions.
Signed-off-by: Patrice Vilchez <patrice.vilchez@atmel.com>
[b.brezillon@overkiz.com: adapt to newer kernel and generalize to other phys]
Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
[nicolas.ferre@atmel.com: commit message modification]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: David J. Choi <david.choi@micrel.com>
---
drivers/net/phy/micrel.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index c31aad0..3ae28f4 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -287,6 +287,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = ks8737_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8021,
@@ -300,6 +302,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8031,
@@ -313,6 +317,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8041,
@@ -326,6 +332,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8051,
@@ -339,6 +347,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8001,
@@ -351,6 +361,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8081,
@@ -363,6 +375,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8061,
@@ -375,6 +389,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ9021,
@@ -387,6 +403,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = ksz9021_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE, },
}, {
.phy_id = PHY_ID_KSZ9031,
@@ -400,6 +418,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = ksz9021_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE, },
}, {
.phy_id = PHY_ID_KSZ8873MLL,
@@ -410,6 +430,8 @@ static struct phy_driver ksphy_driver[] = {
.config_init = kszphy_config_init,
.config_aneg = ksz8873mll_config_aneg,
.read_status = ksz8873mll_read_status,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE, },
}, {
.phy_id = PHY_ID_KSZ886X,
@@ -420,6 +442,8 @@ static struct phy_driver ksphy_driver[] = {
.config_init = kszphy_config_init,
.config_aneg = genphy_config_aneg,
.read_status = genphy_read_status,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE, },
} };
--
1.8.2.2
^ permalink raw reply related
* [PATCH] phy/micrel: Add suspend/resume support to Micrel PHYs
From: Nicolas Ferre @ 2013-09-19 17:39 UTC (permalink / raw)
To: davem, netdev
Cc: f.fainelli, linux-kernel, linux-arm-kernel, Patrice Vilchez,
Nicolas Ferre, David J. Choi
From: Patrice Vilchez <patrice.vilchez@atmel.com>
All supported Micrel PHYs implement the standard "power down" bit 11 of BMCR,
so this patch adds support using the generic genphy_{suspend,resume} functions.
Signed-off-by: Patrice Vilchez <patrice.vilchez@atmel.com>
[b.brezillon@overkiz.com: adapt to newer kernel and generalize to other phys]
Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
[nicolas.ferre@atmel.com: commit message modification]
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: David J. Choi <david.choi@micrel.com>
---
drivers/net/phy/micrel.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index c31aad0..3ae28f4 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -287,6 +287,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = ks8737_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8021,
@@ -300,6 +302,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8031,
@@ -313,6 +317,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8041,
@@ -326,6 +332,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8051,
@@ -339,6 +347,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8001,
@@ -351,6 +361,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8081,
@@ -363,6 +375,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8061,
@@ -375,6 +389,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ9021,
@@ -387,6 +403,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = ksz9021_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE, },
}, {
.phy_id = PHY_ID_KSZ9031,
@@ -400,6 +418,8 @@ static struct phy_driver ksphy_driver[] = {
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = ksz9021_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE, },
}, {
.phy_id = PHY_ID_KSZ8873MLL,
@@ -410,6 +430,8 @@ static struct phy_driver ksphy_driver[] = {
.config_init = kszphy_config_init,
.config_aneg = ksz8873mll_config_aneg,
.read_status = ksz8873mll_read_status,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE, },
}, {
.phy_id = PHY_ID_KSZ886X,
@@ -420,6 +442,8 @@ static struct phy_driver ksphy_driver[] = {
.config_init = kszphy_config_init,
.config_aneg = genphy_config_aneg,
.read_status = genphy_read_status,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
.driver = { .owner = THIS_MODULE, },
} };
--
1.8.2.2
^ permalink raw reply related
* Re: [PATCH v2.39 7/7] datapath: Add basic MPLS support to kernel
From: Jesse Gross @ 2013-09-19 17:31 UTC (permalink / raw)
To: Simon Horman
Cc: Pravin Shelar, dev@openvswitch.org, netdev, Ravi K,
Isaku Yamahata, Joe Stringer
In-Reply-To: <20130918220756.GA24919@verge.net.au>
On Wed, Sep 18, 2013 at 5:07 PM, Simon Horman <horms@verge.net.au> wrote:
> On Tue, Sep 17, 2013 at 11:38:18AM -0700, Pravin Shelar wrote:
>> On Mon, Sep 9, 2013 at 12:20 AM, Simon Horman <horms@verge.net.au> wrote:
>> > diff --git a/datapath/datapath.h b/datapath/datapath.h
>> > index 5d50dd4..babae3b 100644
>> > --- a/datapath/datapath.h
>> > +++ b/datapath/datapath.h
>> > @@ -36,6 +36,10 @@
>> >
>> > #define SAMPLE_ACTION_DEPTH 3
>> >
>> > +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
>> > +#define HAVE_INNER_PROTOCOL
>> > +#endif
>> > +
>> > /**
>> > * struct dp_stats_percpu - per-cpu packet processing statistics for a given
>> > * datapath.
>> > @@ -93,11 +97,16 @@ struct datapath {
>> > * @pkt_key: The flow information extracted from the packet. Must be nonnull.
>> > * @tun_key: Key for the tunnel that encapsulated this packet. NULL if the
>> > * packet is not being tunneled.
>> > + * @inner_protocol: Provides a substitute for the skb->inner_protocol field on
>> > + * kernels before 3.11.
>> > */
>> > struct ovs_skb_cb {
>> > struct sw_flow *flow;
>> > struct sw_flow_key *pkt_key;
>> > struct ovs_key_ipv4_tunnel *tun_key;
>> > +#ifndef HAVE_INNER_PROTOCOL
>> > + __be16 inner_protocol;
>> > +#endif
>> > };
>> > #define OVS_CB(skb) ((struct ovs_skb_cb *)(skb)->cb)
>> >
>> Can you move this to compat struct ovs_gso_cb {}
>
> I think that you are correct and inner_protocol needs
> to be in struct ovs_gso_cb so that it can
> be accessed via skb_network_protocol() from
> rpl___skb_gso_segment().
>
> However I think it may also need to be present in struct ovs_cb
> so that it can be set correctly.
>
> Currently it is set unconditionally
> in ovs_execute_actions() and Jesse has suggested setting
> it conditionally in pop_mpls() (which is called by do_execute_actions()).
> But regardless it seems to me that the field would need to be available
> in struct ovs_cb.
Since the helper functions are also in the compat code, I think they
should have access to ovs_gso_cb.
>> I think we can simplify code by pushing vlan and then segmenting skb,
>> the way we do it for MPLS.
>
> Are you thinking of something like the following which applies
> prior to the MPLS code.
This is basically what I was thinking about. We might actually be able
to move all of this to compat code by having a replacement for
dev_queue_xmit() similar to what we have for ip_local_out() in the
tunnel code.
^ permalink raw reply
* Re: [PATCH v2.39 7/7] datapath: Add basic MPLS support to kernel
From: Jesse Gross @ 2013-09-19 17:21 UTC (permalink / raw)
To: Simon Horman
Cc: Ben Pfaff, Pravin Shelar, dev@openvswitch.org, netdev, Ravi K,
Isaku Yamahata, Joe Stringer
In-Reply-To: <20130919155732.GC24919@verge.net.au>
On Thu, Sep 19, 2013 at 10:57 AM, Simon Horman <horms@verge.net.au> wrote:
> On Mon, Sep 16, 2013 at 03:38:21PM -0500, Jesse Gross wrote:
>> On Mon, Sep 9, 2013 at 12:20 AM, Simon Horman <horms@verge.net.au> wrote:
>> > @@ -616,6 +736,13 @@ int ovs_execute_actions(struct datapath *dp, struct sk_buff *skb)
>> > goto out_loop;
>> > }
>> >
>> > + /* Needed to initialise inner protocol on kernels older
>> > + * than v3.11 where skb->inner_protocol is not present
>> > + * and compatibility code uses the OVS_CB(skb) to store
>> > + * the inner protocol.
>> > + */
>> > + ovs_skb_set_inner_protocol(skb, skb->protocol);
>>
>> The comment makes it sound like this code should just be deleted when
>> upstreaming. However, I believe that we still need to initialize this
>> field, right? Is this the best place do it or should it be conditional
>> on adding a first MPLS header? (i.e. what happens if inner_protocol is
>> already set and the packet simply passes through OVS?)
>
> I believe there are several problems here.
>
> The first one, which my comment was written around is that I think that if
> inner_protocol is a field of struct sk_buff then we can rely on it already
> being initialised. However, if we are using compatibility code, where
> inner_protcol is called in the callback field of struct sk_buff then I
> think that OVS needs to initialise it.
I'm not sure that it's true that inner_protocol is already initialized
- I grepped the tree and the only assignment that I found is in
skbuff.c in __copy_skb_header().
> A second problem is one that you raise which I had not considered
> which is how to handle things if inner_protocol is already set.
>
> I believe this should only occur in the case where inner_protocol
> is a field of struct sk_buff and I think it would be most convenient
> to set it conditionally in ovs_skb_reset_inner_protocol().
> I think that if it is not set it should be zero but it should be
> safe to check for values less than ETH_P_802_3_MIN.
It's probably OK to check for values less than ETH_P_802_3_MIN but I'm
not sure that it's the most correct thing to do since skb->protocol
could contain these values (such as ETH_P_802_2). It's unlikely that
they will be GSO packets but it seems better to use the more strict
check against zero.
One other consideration in the OVS case - with recirculation we may
hit this code multiple times and the difference in behavior could be
surprising. However, on the other hand, we need to be careful because
skb->cb is not guaranteed to be initialized to zero.
^ permalink raw reply
* Re: [PATCH] powerpc/83xx: gianfar_ptp: select 1588 clock source through dts file
From: Richard Cochran @ 2013-09-19 17:12 UTC (permalink / raw)
To: Claudiu Manoil; +Cc: Aida Mynzhasova, netdev
In-Reply-To: <523B268A.2010805@freescale.com>
On Thu, Sep 19, 2013 at 07:30:02PM +0300, Claudiu Manoil wrote:
>
> If you ask me, updates for the device trees of several powerpc
> boards, like the 83xx series (as this patch implies), should be
> discussed and agreed upon on the powerpc list (linuxppc-dev@lists.ozlabs.org),
> where these kind of changes are usually being discussed with people more
> knowledgeable in device tree bindings and the powerpc/83xx hardware.
Yes, and also CC the devicetree list. The original device tree
attributes for the gianfar eTSEC timer functions were reviewed on
all three lists.
Thanks,
Richard
^ permalink raw reply
* Re: add ip to interface as primary ip address, not secondary ip when there is alreadly primary ip?
From: Vincent Li @ 2013-09-19 16:54 UTC (permalink / raw)
To: Cong Wang; +Cc: netdev@vger.kernel.org
In-Reply-To: <l1as5j$7cs$1@ger.gmane.org>
thanks for the pointer
'ip addr' indeed has flag IFA_F_SECONDARY for this, but it is not
available for 'ip addr add', so I made a simple patch for iproute2
ip/ipaddress.c as below:
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index 1c3e4da..b5aa96a 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -1307,6 +1307,11 @@ static int ipaddr_modify(int cmd, int flags,
int argc, char **argv)
invarg("invalid scope value.", *argv);
req.ifa.ifa_scope = scope;
scoped = 1;
+ } else if (strcmp(*argv, "secondary") == 0 ||
+ strcmp(*argv, "temporary") == 0) {
+ req.ifa.ifa_flags |= IFA_F_SECONDARY;
+ } else if (strcmp(*argv, "primary") == 0) {
+ req.ifa.ifa_flags &= ~IFA_F_SECONDARY;
} else if (strcmp(*argv, "dev") == 0) {
NEXT_ARG();
d = *argv;
I also found that I need to patch up the kernel and here is the kernel
patch, it might look silly, but it works as I tested
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index a1b5bcb..2a1d61b 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -440,14 +440,18 @@ static int __inet_insert_ifa(struct in_ifaddr
*ifa, struct nlmsghdr *nlh,
return 0;
}
- ifa->ifa_flags &= ~IFA_F_SECONDARY;
last_primary = &in_dev->ifa_list;
for (ifap = &in_dev->ifa_list; (ifa1 = *ifap) != NULL;
ifap = &ifa1->ifa_next) {
if (!(ifa1->ifa_flags & IFA_F_SECONDARY) &&
- ifa->ifa_scope <= ifa1->ifa_scope)
- last_primary = &ifa1->ifa_next;
+ ifa->ifa_scope <= ifa1->ifa_scope) {
+ if (ifa->ifa_flags & IFA_F_SECONDARY) {
+ last_primary = &ifa1->ifa_next;
+ } else {
+ ifa1->ifa_flags |= IFA_F_SECONDARY;
+ }
+ }
if (ifa1->ifa_mask == ifa->ifa_mask &&
inet_ifa_match(ifa1->ifa_address, ifa)) {
if (ifa1->ifa_local == ifa->ifa_local) {
@@ -458,7 +462,11 @@ static int __inet_insert_ifa(struct in_ifaddr
*ifa, struct nlmsghdr *nlh,
inet_free_ifa(ifa);
return -EINVAL;
}
- ifa->ifa_flags |= IFA_F_SECONDARY;
+ if (ifa->ifa_flags & IFA_F_SECONDARY) {
+ ifa->ifa_flags |= IFA_F_SECONDARY;
+ } else {
+ ifa->ifa_flags &= ~IFA_F_SECONDARY;
+ }
}
}
my test steps:
1
./ip/ip addr add 192.168.1.1/24 scope global secondary dev eth0
./ip/ip adrr show eth0 >> /tmp/ipaddr.txt
2
./ip/ip addr add 192.168.1.2/24 scope global primary dev eth0
./ip/ip addr show eth0 >> /tmp/ipaddr.txt
3
./ip/ip addr add 192.168.1.3/24 scope global primary dev eth0
./ip/ip addr show eth0 >> /tmp/ipaddr.txt
4
./ip/ip addr add 192.168.1.4/24 scope global secondary dev eth0
./ip/ip addr show eth0 >> /tmp/ipaddr.txt
5
./ip/ip addr add 192.168.1.5/24 scope global dev eth0
./ip/ip addr show eth0 >> /tmp/ipaddr.txt
6
./ip/ip addr del 192.168.1.5/24 dev eth0
./ip/ip addr show eth0 >> /tmp/ipaddr.txt
test result for each step
result 1
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
link/ether 52:54:00:e3:8f:33 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 scope global secondary eth0
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fee3:8f33/64 scope link
valid_lft forever preferred_lft forever
result 2
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
link/ether 52:54:00:e3:8f:33 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.2/24 scope global eth0
valid_lft forever preferred_lft forever
inet 192.168.1.1/24 scope global secondary eth0
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fee3:8f33/64 scope link
valid_lft forever preferred_lft forever
result 3
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
link/ether 52:54:00:e3:8f:33 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.3/24 scope global eth0
valid_lft forever preferred_lft forever
inet 192.168.1.2/24 scope global secondary eth0
valid_lft forever preferred_lft forever
inet 192.168.1.1/24 scope global secondary eth0
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fee3:8f33/64 scope link
valid_lft forever preferred_lft forever
result 4
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
link/ether 52:54:00:e3:8f:33 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.3/24 scope global eth0
valid_lft forever preferred_lft forever
inet 192.168.1.2/24 scope global secondary eth0
valid_lft forever preferred_lft forever
inet 192.168.1.1/24 scope global secondary eth0
valid_lft forever preferred_lft forever
inet 192.168.1.4/24 scope global secondary eth0
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fee3:8f33/64 scope link
valid_lft forever preferred_lft forever
result 5
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
link/ether 52:54:00:e3:8f:33 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.5/24 scope global eth0
valid_lft forever preferred_lft forever
inet 192.168.1.3/24 scope global secondary eth0
valid_lft forever preferred_lft forever
inet 192.168.1.2/24 scope global secondary eth0
valid_lft forever preferred_lft forever
inet 192.168.1.1/24 scope global secondary eth0
valid_lft forever preferred_lft forever
inet 192.168.1.4/24 scope global secondary eth0
valid_lft forever preferred_lft forever
inet6 fe80::5054:ff:fee3:8f33/64 scope link
valid_lft forever preferred_lft forever
result 6
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UP group default qlen 1000
link/ether 52:54:00:e3:8f:33 brd ff:ff:ff:ff:ff:ff
inet6 fe80::5054:ff:fee3:8f33/64 scope link
valid_lft forever preferred_lft forever
it does seems to achieve what I wanted, any comment on this?
On Tue, Sep 17, 2013 at 5:29 PM, Cong Wang <xiyou.wangcong@gmail.com> wrote:
> On Tue, 17 Sep 2013 at 22:31 GMT, Vincent Li <vincent.mc.li@gmail.com> wrote:
>>
>> ideally though, we would like to have the capability in
>> kernel/userspace to specify a flag or something to add any ip as
>> primary even if there is already existing primary ip address (could
>> downgrade the existing primary to secondary ip). does this make sense
>> ?
>
> 'ip addr' already has flags for this.
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" 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 related
* [PATCH] skge: fix broken driver
From: Mikulas Patocka @ 2013-09-19 16:33 UTC (permalink / raw)
To: David S. Miller, Stephen Hemminger, netdev
The patch 136d8f377e1575463b47840bc5f1b22d94bf8f63 broke the skge driver.
Note this part of the patch:
+ if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
+ dev_kfree_skb(nskb);
+ goto resubmit;
+ }
+
pci_unmap_single(skge->hw->pdev,
dma_unmap_addr(e, mapaddr),
dma_unmap_len(e, maplen),
PCI_DMA_FROMDEVICE);
skb = e->skb;
prefetch(skb->data);
- skge_rx_setup(skge, e, nskb, skge->rx_buf_size);
The function skge_rx_setup modifies e->skb to point to the new skb. Thus,
after this change, the new buffer, not the old, is returned to the
networking stack.
This bug is present in kernels 3.11, 3.11.1 and 3.12-rc1.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@kernel.org # 3.11
---
drivers/net/ethernet/marvell/skge.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c
===================================================================
--- linux-3.11.1-fast.orig/drivers/net/ethernet/marvell/skge.c 2013-09-10 19:46:58.000000000 +0200
+++ linux-3.11.1-fast/drivers/net/ethernet/marvell/skge.c 2013-09-19 18:20:43.000000000 +0200
@@ -3092,6 +3092,9 @@ static struct sk_buff *skge_rx_get(struc
if (!nskb)
goto resubmit;
+ skb = e->skb;
+ prefetch(skb->data);
+
if (skge_rx_setup(skge, e, nskb, skge->rx_buf_size) < 0) {
dev_kfree_skb(nskb);
goto resubmit;
@@ -3101,8 +3104,6 @@ static struct sk_buff *skge_rx_get(struc
dma_unmap_addr(e, mapaddr),
dma_unmap_len(e, maplen),
PCI_DMA_FROMDEVICE);
- skb = e->skb;
- prefetch(skb->data);
}
skb_put(skb, len);
^ 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