1. 28 Jul, 2014 1 commit
  2. 23 Jul, 2014 1 commit
  3. 22 Jul, 2014 5 commits
    • Li Zhong's avatar
      powerpc: use _GLOBAL_TOC for memmove · 6f5405bc
      Li Zhong authored
      memmove may be called from module code copy_pages(btrfs), and it may
      call memcpy, which may call back to C code, so it needs to use
      _GLOBAL_TOC to set up r2 correctly.
      This fixes following error when I tried to boot an le guest:
      Vector: 300 (Data Access) at [c000000073f97210]
          pc: c000000000015004: enable_kernel_altivec+0x24/0x80
          lr: c000000000058fbc: enter_vmx_copy+0x3c/0x60
          sp: c000000073f97490
         msr: 8000000002009033
         dar: d000000001d50170
       dsisr: 40000000
        current = 0xc0000000734c0000
        paca    = 0xc00000000fff0000	 softe: 0	 irq_happened: 0x01
          pid   = 815, comm = mktemp
      enter ? for help
      [c000000073f974f0] c000000000058fbc enter_vmx_copy+0x3c/0x60
      [c000000073f97510] c000000000057d34 memcpy_power7+0x274/0x840
      [c000000073f97610] d000000001c3179c copy_pages+0xfc/0x110 [btrfs]
      [c000000073f97660] d000000001c3c248 memcpy_extent_buffer+0xe8/0x160 [btrfs]
      [c000000073f97700] d000000001be4be8 setup_items_for_insert+0x208/0x4a0 [btrfs]
      [c000000073f97820] d000000001be50b4 btrfs_insert_empty_items+0xf4/0x140 [btrfs]
      [c000000073f97890] d000000001bfed30 insert_with_overflow+0x70/0x180 [btrfs]
      [c000000073f97900] d000000001bff174 btrfs_insert_dir_item+0x114/0x2f0 [btrfs]
      [c000000073f979a0] d000000001c1f92c btrfs_add_link+0x10c/0x370 [btrfs]
      [c000000073f97a40] d000000001c20e94 btrfs_create+0x204/0x270 [btrfs]
      [c000000073f97b00] c00000000026d438 vfs_create+0x178/0x210
      [c000000073f97b50] c000000000270a70 do_last+0x9f0/0xe90
      [c000000073f97c20] c000000000271010 path_openat+0x100/0x810
      [c000000073f97ce0] c000000000272ea8 do_filp_open+0x58/0xd0
      [c000000073f97dc0] c00000000025ade8 do_sys_open+0x1b8/0x300
      [c000000073f97e30] c00000000000a008 syscall_exit+0x0/0x7c
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Tyrel Datwyler's avatar
      powerpc/pseries: dynamically added OF nodes need to call of_node_init · 97a9a717
      Tyrel Datwyler authored
      Commit 75b57ecf refactored device tree nodes to use kobjects such that they
      can be exposed via /sysfs. A secondary commit 0829f6d1 furthered this rework
      by moving the kobect initialization logic out of of_node_add into its own
      of_node_init function. The inital commit removed the existing kref_init calls
      in the pseries dlpar code with the assumption kobject initialization would
      occur in of_node_add. The second commit had the side effect of triggering a
      BUG_ON during DLPAR, migration and suspend/resume operations as a result of
      dynamically added nodes being uninitialized.
      This patch fixes this by adding of_node_init calls in place of the previously
      removed kref_init calls.
      Fixes: 0829f6d1
       ("of: device_node kobject lifecycle fixes")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarTyrel Datwyler <tyreld@linux.vnet.ibm.com>
      Acked-by: default avatarNathan Fontenot <nfont@linux.vnet.ibm.com>
      Acked-by: default avatarGrant Likely <grant.likely@linaro.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Aneesh Kumar K.V's avatar
      powerpc: subpage_protect: Increase the array size to take care of 64TB · dad6f37c
      Aneesh Kumar K.V authored
      We now support TASK_SIZE of 16TB, hence the array should be 8.
      Fixes the below crash:
      Unable to handle kernel paging request for data at address 0x000100bd
      Faulting instruction address: 0xc00000000004f914
      cpu 0x13: Vector: 300 (Data Access) at [c000000fea75fa90]
          pc: c00000000004f914: .sys_subpage_prot+0x2d4/0x5c0
          lr: c00000000004fb5c: .sys_subpage_prot+0x51c/0x5c0
          sp: c000000fea75fd10
         msr: 9000000000009032
         dar: 100bd
       dsisr: 40000000
        current = 0xc000000fea6ae490
        paca    = 0xc00000000fb8ab00   softe: 0        irq_happened: 0x00
          pid   = 8237, comm = a.out
      enter ? for help
      [c000000fea75fe30] c00000000000a164 syscall_exit+0x0/0x98
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Paul Mackerras's avatar
      powerpc: Fix bugs in emulate_step() · e698b966
      Paul Mackerras authored
      This fixes some bugs in emulate_step().  First, the setting of the carry
      bit for the arithmetic right-shift instructions was not correct on 64-bit
      machines because we were masking with a mask of type int rather than
      unsigned long.  Secondly, the sld (shift left doubleword) instruction was
      using the wrong instruction field for the register containing the shift
      Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Joel Stanley's avatar
      powerpc: Disable doorbells on Power8 DD1.x · bd6ba351
      Joel Stanley authored
      These processors do not currently support doorbell IPIs, so remove them
      from the feature list if we are at DD 1.xx for the 0x004d part.
      This fixes a regression caused by d4e58e59 (powerpc/powernv: Enable
      POWER8 doorbell IPIs). With that patch the kernel would hang at boot
      when calling smp_call_function_many, as the doorbell would not be
      received by the target CPUs:
        .smp_call_function_many+0x2bc/0x3c0 (unreliable)
      Fixes: d4e58e59
       (powerpc/powernv: Enable POWER8 doorbell IPIs)
      Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
  4. 11 Jul, 2014 8 commits
    • Anton Blanchard's avatar
      powerpc/perf: Never program book3s PMCs with values >= 0x80000000 · f5602941
      Anton Blanchard authored
      We are seeing a lot of PMU warnings on POWER8:
          Can't find PMC that caused IRQ
      Looking closer, the active PMC is 0 at this point and we took a PMU
      exception on the transition from negative to 0. Some versions of POWER8
      have an issue where they edge detect and not level detect PMC overflows.
      A number of places program the PMC with (0x80000000 - period_left),
      where period_left can be negative. We can either fix all of these or
      just ensure that period_left is always >= 1.
      This patch takes the second option.
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Guenter Roeck's avatar
      powerpc: Disable RELOCATABLE for COMPILE_TEST with PPC64 · fb43e847
      Guenter Roeck authored
      powerpc:allmodconfig has been failing for some time with the following
      arch/powerpc/kernel/exceptions-64s.S: Assembler messages:
      arch/powerpc/kernel/exceptions-64s.S:1312: Error: attempt to move .org backwards
      make[1]: *** [arch/powerpc/kernel/head_64.o] Error 1
      A number of attempts to fix the problem by moving around code have been
      unsuccessful and resulted in failed builds for some configurations and
      the discovery of toolchain bugs.
      Fix the problem by disabling RELOCATABLE for COMPILE_TEST builds instead.
      While this is less than perfect, it avoids substantial code changes
      which would otherwise be necessary just to make COMPILE_TEST builds
      happy and might have undesired side effects.
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Joel Stanley's avatar
      powerpc/perf: Clear MMCR2 when enabling PMU · b50a6c58
      Joel Stanley authored
      On POWER8 when switching to a KVM guest we set bits in MMCR2 to freeze
      the PMU counters. Aside from on boot they are then never reset,
      resulting in stuck perf counters for any user in the guest or host.
      We now set MMCR2 to 0 whenever enabling the PMU, which provides a sane
      state for perf to use the PMU counters under either the guest or the
      This was manifesting as a bug with ppc64_cpu --frequency:
          $ sudo ppc64_cpu --frequency
          WARNING: couldn't run on cpu 0
          WARNING: couldn't run on cpu 8
          WARNING: couldn't run on cpu 144
          WARNING: couldn't run on cpu 152
          min:    18446744073.710 GHz (cpu -1)
          max:    0.000 GHz (cpu -1)
          avg:    0.000 GHz
      The command uses a perf counter to measure CPU cycles over a fixed
      amount of time, in order to approximate the frequency of the machine.
      The counters were returning zero once a guest was started, regardless of
      weather it was still running or had been shut down.
      By dumping the value of MMCR2, it was observed that once a guest is
      running MMCR2 is set to 1s - which stops counters from running:
          $ sudo sh -c 'echo p > /proc/sysrq-trigger'
          CPU: 0 PMU registers, ppmu = POWER8 n_counters = 6
          PMC1:  5b635e38 PMC2: 00000000 PMC3: 00000000 PMC4: 00000000
          PMC5:  1bf5a646 PMC6: 5793d378 PMC7: deadbeef PMC8: deadbeef
          MMCR0: 0000000080000000 MMCR1: 000000001e000000 MMCRA: 0000040000000000
          MMCR2: fffffffffffffc00 EBBHR: 0000000000000000
          EBBRR: 0000000000000000 BESCR: 0000000000000000
          SIAR:  00000000000a51cc SDAR:  c00000000fc40000 SIER:  0000000001000000
      This is done unconditionally in book3s_hv_interrupts.S upon entering the
      guest, and the original value is only save/restored if the host has
      indicated it was using the PMU. This is okay, however the user of the
      PMU needs to ensure that it is in a defined state when it starts using
      Fixes: e05b9b9e
       ("powerpc/perf: Power8 PMU support")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
      Acked-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Joel Stanley's avatar
      powerpc/perf: Add PPMU_ARCH_207S define · 4d9690dd
      Joel Stanley authored
      Instead of separate bits for every POWER8 PMU feature, have a single one
      for v2.07 of the architecture.
      This saves us adding a MMCR2 define for a future patch.
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
      Acked-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Joel Stanley's avatar
      powerpc/kvm: Remove redundant save of SIER AND MMCR2 · f73128f4
      Joel Stanley authored
      These two registers are already saved in the block above. Aside from
      being unnecessary, by the time we get down to the second save location
      r8 no longer contains MMCR2, so we are clobbering the saved value with
      MMCR2 primarily consists of counter freeze bits. So restoring the value
      of PMC5 into MMCR2 will most likely have the effect of freezing
      Fixes: 72cde5a8
       ("KVM: PPC: Book3S HV: Save/restore host PMU registers that are new in POWER8")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJoel Stanley <joel@jms.id.au>
      Acked-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Acked-by: default avatarPaul Mackerras <paulus@samba.org>
      Reviewed-by: default avatarAlexander Graf <agraf@suse.de>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Preeti U Murthy's avatar
      powerpc/powernv: Check for IRQHAPPENED before sleeping · c733cf83
      Preeti U Murthy authored
      Commit 8d6f7c5a
      : "powerpc/powernv: Make it possible to skip the IRQHAPPENED
      check in power7_nap()" added code that prevents cpus from checking for
      pending interrupts just before entering sleep state, which is wrong. These
      interrupts are delivered during the soft irq disabled state of the cpu.
      A cpu cannot enter any idle state with pending interrupts because they will
      never be serviced until the next time the cpu is woken up by some other
      interrupt. Its only then that the pending interrupts are replayed. This can result
      in device timeouts or warnings about this cpu being stuck.
      This patch fixes ths issue by ensuring that cpus check for pending interrupts
      just before entering any idle state as long as they are not in the path of split
      core operations.
      Signed-off-by: default avatarPreeti U Murthy <preeti@linux.vnet.ibm.com>
      Acked-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Michael Ellerman's avatar
      powerpc: Clean up MMU_FTRS_A2 and MMU_FTR_TYPE_3E · cd68098b
      Michael Ellerman authored
      In fb5a5157
       "powerpc: Remove platforms/wsp and associated pieces",
      we removed the last user of MMU_FTRS_A2. So remove it.
      MMU_FTRS_A2 was the last user of MMU_FTR_TYPE_3E, so remove it also.
      This leaves some unreachable code in mmu_context_nohash.c, so remove
      that also.
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Michael Ellerman's avatar
      powerpc/cell: Fix compilation with CONFIG_COREDUMP=n · e623fbf1
      Michael Ellerman authored
      Commit 046d662f
       "coredump: make core dump functionality optional"
      made the coredump optional, but didn't update the spufs code that
      depends on it. That leads to build errors such as:
        arch/powerpc/platforms/built-in.o: In function `.spufs_arch_write_note':
        coredump.c:(.text+0x22cd4): undefined reference to `.dump_emit'
        coredump.c:(.text+0x22cf4): undefined reference to `.dump_emit'
        coredump.c:(.text+0x22d0c): undefined reference to `.dump_align'
        coredump.c:(.text+0x22d48): undefined reference to `.dump_emit'
        coredump.c:(.text+0x22e7c): undefined reference to `.dump_skip'
      Fix it by adding some ifdefs in the cell code.
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
  5. 25 Jun, 2014 3 commits
    • Scott Wood's avatar
      powerpc: Don't skip ePAPR spin-table CPUs · 6663a4fa
      Scott Wood authored
      Commit 59a53afe
       "powerpc: Don't setup
      CPUs with bad status" broke ePAPR SMP booting.  ePAPR says that CPUs
      that aren't presently running shall have status of disabled, with
      enable-method being used to determine whether the CPU can be enabled.
      Fix by checking for spin-table, which is currently the only supported
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      Cc: Michael Neuling <mikey@neuling.org>
      Cc: Emil Medve <Emilian.Medve@Freescale.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Laurent Dufour's avatar
      powerpc/module: Fix TOC symbol CRC · c2cbcf53
      Laurent Dufour authored
      The commit 71ec7c55
       introduced the magic symbol ".TOC." for ELFv2 ABI.
      This symbol is built manually and has no CRC value computed. A zero value
      is put in the CRC section to avoid modpost complaining about a missing CRC.
      Unfortunately, this breaks the kernel module loading when the kernel is
      relocated (kdump case for instance) because of the relocation applied to
      the kcrctab values.
      This patch compute a CRC value for the TOC symbol which will match the one
      compute by the kernel when it is relocated - aka '0 - relocate_start' done in
      maybe_relocated called by check_version (module.c).
      Signed-off-by: default avatarLaurent Dufour <ldufour@linux.vnet.ibm.com>
      Cc: Anton Blanchard <anton@samba.org>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
    • Michael Ellerman's avatar
      powerpc/powernv: Remove OPAL v1 takeover · e2500be2
      Michael Ellerman authored
      In commit 27f44888 "Add OPAL takeover from PowerVM" we added support
      for "takeover" on OPAL v1 machines.
      This was a mode of operation where we would boot under pHyp, and query
      for the presence of OPAL. If detected we would then do a special
      sequence to take over the machine, and the kernel would end up running
      in hypervisor mode.
      OPAL v1 was never a supported product, and was never shipped outside
      IBM. As far as we know no one is still using it.
      Newer versions of OPAL do not use the takeover mechanism. Although the
      query for OPAL should be harmless on machines with newer OPAL, we have
      seen a machine where it causes a crash in Open Firmware.
      The code in early_init_devtree() to copy boot_command_line into cmd_line
      was added in commit 817c21ad
       "Get kernel command line accross OPAL
      takeover", and AFAIK is only used by takeover, so should also be
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
  6. 24 Jun, 2014 13 commits
  7. 16 Jun, 2014 5 commits
    • Benjamin Herrenschmidt's avatar
      Revert "offb: Add palette hack for little endian" · 68986c9f
      Benjamin Herrenschmidt authored
      This reverts commit e1edf18b
      This patch was a misguided attempt at fixing offb for LE ppc64
      kernels on BE qemu but is just wrong ... it breaks real LE/LE
      setups, LE with real HW, and existing mixed endian systems
      that did the fight thing with the appropriate device-tree
      property. Bad reviewing on my part, sorry.
      The right fix is to either make qemu change its endian when
      the guest changes endian (working on that) or to use the
      existing foreign endian support.
      Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
      CC: <stable@vger.kernel.org> [v3.13+]
    • Linus Torvalds's avatar
      Linux 3.16-rc1 · 7171511e
      Linus Torvalds authored
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · a9be2242
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       1) Fix checksumming regressions, from Tom Herbert.
       2) Undo unintentional permissions changes for SCTP rto_alpha and
          rto_beta sysfs knobs, from Denial Borkmann.
       3) VXLAN, like other IP tunnels, should advertize it's encapsulation
          size using dev->needed_headroom instead of dev->hard_header_len.
          From Cong Wang.
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        net: sctp: fix permissions for rto_alpha and rto_beta knobs
        vxlan: Checksum fixes
        net: add skb_pop_rcv_encapsulation
        udp: call __skb_checksum_complete when doing full checksum
        net: Fix save software checksum complete
        net: Fix GSO constants to match NETIF flags
        udp: ipv4: do not waste time in __udp4_lib_mcast_demux_lookup
        vxlan: use dev->needed_headroom instead of dev->hard_header_len
        MAINTAINERS: update cxgb4 maintainer
    • Linus Torvalds's avatar
      Merge tag 'clk-for-linus-3.16-part2' of git://git.linaro.org/people/mike.turquette/linux · dd1845af
      Linus Torvalds authored
      Pull more clock framework updates from Mike Turquette:
       "This contains the second half the of the clk changes for 3.16.
        They are simply fixes and code refactoring for the OMAP clock drivers.
        The sunxi clock driver changes include splitting out the one
        mega-driver into several smaller pieces and adding support for the A31
        SoC clocks"
      * tag 'clk-for-linus-3.16-part2' of git://git.linaro.org/people/mike.turquette/linux: (25 commits)
        clk: sunxi: document PRCM clock compatible strings
        clk: sunxi: add PRCM (Power/Reset/Clock Management) clks support
        clk: sun6i: Protect SDRAM gating bit
        clk: sun6i: Protect CPU clock
        clk: sunxi: Rework clock protection code
        clk: sunxi: Move the GMAC clock to a file of its own
        clk: sunxi: Move the 24M oscillator to a file of its own
        clk: sunxi: Remove calls to clk_put
        clk: sunxi: document new A31 USB clock compatible
        clk: sunxi: Implement A31 USB clock
        ARM: dts: OMAP5/DRA7: use omap5-mpu-dpll-clock capable of dealing with higher frequencies
        CLK: TI: dpll: support OMAP5 MPU DPLL that need special handling for higher frequencies
        ARM: OMAP5+: dpll: support Duty Cycle Correction(DCC)
        CLK: TI: clk-54xx: Set the rate for dpll_abe_m2x2_ck
        CLK: TI: Driver for DRA7 ATL (Audio Tracking Logic)
        dt:/bindings: DRA7 ATL (Audio Tracking Logic) clock bindings
        ARM: dts: dra7xx-clocks: Correct name for atl clkin3 clock
        CLK: TI: gate: add composite interface clock to OMAP2 only build
        ARM: OMAP2: clock: add DT boot support for cpufreq_ck
        CLK: TI: OMAP2: add clock init support
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/users/willy/linux-nvme · b55b3902
      Linus Torvalds authored
      Pull NVMe update from Matthew Wilcox:
       "Mostly bugfixes again for the NVMe driver.  I'd like to call out the
        exported tracepoint in the block layer; I believe Keith has cleared
        this with Jens.
        We've had a few reports from people who're really pounding on NVMe
        devices at scale, hence the timeout changes (and new module
        parameters), hotplug cpu deadlock, tracepoints, and minor performance
      [ Jens hadn't seen that tracepoint thing, but is ok with it - it will
        end up going away when mq conversion happens ]
      * git://git.infradead.org/users/willy/linux-nvme: (22 commits)
        NVMe: Fix START_STOP_UNIT Scsi->NVMe translation.
        NVMe: Use Log Page constants in SCSI emulation
        NVMe: Define Log Page constants
        NVMe: Fix hot cpu notification dead lock
        NVMe: Rename io_timeout to nvme_io_timeout
        NVMe: Use last bytes of f/w rev SCSI Inquiry
        NVMe: Adhere to request queue block accounting enable/disable
        NVMe: Fix nvme get/put queue semantics
        NVMe: Make admin timeout a module parameter
        NVMe: Make iod bio timeout a parameter
        NVMe: Prevent possible NULL pointer dereference
        NVMe: Fix the buffer size passed in GetLogPage(CDW10.NUMD)
        NVMe: Update data structures for NVMe 1.2
        NVMe: Enable BUILD_BUG_ON checks
        NVMe: Update namespace and controller identify structures to the 1.1a spec
        NVMe: Flush with data support
        NVMe: Configure support for block flush
        NVMe: Add tracepoints
        NVMe: Protect against badly formatted CQEs
  8. 15 Jun, 2014 4 commits
    • Daniel Borkmann's avatar
      net: sctp: fix permissions for rto_alpha and rto_beta knobs · b58537a1
      Daniel Borkmann authored
      Commit 3fd091e7 ("[SCTP]: Remove multiple levels of msecs
      to jiffies conversions.") has silently changed permissions for
      rto_alpha and rto_beta knobs from 0644 to 0444. The purpose of
      this was to discourage users from tweaking rto_alpha and
      rto_beta knobs in production environments since they are key
      to correctly compute rtt/srtt.
      RFC4960 under section 6.3.1. RTO Calculation says regarding
      rto_alpha and rto_beta under rule C3 and C4:
        C3)  When a new RTT measurement R' is made, set
             RTTVAR <- (1 - RTO.Beta) * RTTVAR + RTO.Beta * |SRTT - R'|
             SRTT <- (1 - RTO.Alpha) * SRTT + RTO.Alpha * R'
             Note: The value of SRTT used in the update to RTTVAR
             is its value before updating SRTT itself using the
             second assignment. After the computation, update
             RTO <- SRTT + 4 * RTTVAR.
        C4)  When data is in flight and when allowed by rule C5
             below, a new RTT measurement MUST be made each round
             trip. Furthermore, new RTT measurements SHOULD be
             made no more than once per round trip for a given
             destination transport address. There are two reasons
             for this recommendation: First, it appears that
             measuring more frequently often does not in practice
             yield any significant benefit [ALLMAN99]; second,
             if measurements are made more often, then the values
             of RTO.Alpha and RTO.Beta in rule C3 above should be
             adjusted so that SRTT and RTTVAR still adjust to
             changes at roughly the same rate (in terms of how many
             round trips it takes them to reflect new values) as
             they would if making only one measurement per
             round-trip and using RTO.Alpha and RTO.Beta as given
             in rule C3. However, the exact nature of these
             adjustments remains a research issue.
      While it is discouraged to adjust rto_alpha and rto_beta
      and not further specified how to adjust them, the RFC also
      doesn't explicitly forbid it, but rather gives a RECOMMENDED
      default value (rto_alpha=3, rto_beta=2). We have a couple
      of users relying on the old permissions before they got
      changed. That said, if someone really has the urge to adjust
      them, we could allow it with a warning in the log.
      Fixes: 3fd091e7
       ("[SCTP]: Remove multiple levels of msecs to jiffies conversions.")
      Signed-off-by: default avatarDaniel Borkmann <dborkman@redhat.com>
      Cc: Vlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • David S. Miller's avatar
      Merge branch 'csum_fixes' · e4f7ae93
      David S. Miller authored
      Tom Herbert says:
      Fixes related to some recent checksum modifications.
      - Fix GSO constants to match NETIF flags
      - Fix logic in saving checksum complete in __skb_checksum_complete
      - Call __skb_checksum_complete from UDP if we are checksumming over
        whole packet in order to save checksum.
      - Fixes to VXLAN to work correctly with checksum complete
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Tom Herbert's avatar
      vxlan: Checksum fixes · f79b064c
      Tom Herbert authored
      Call skb_pop_rcv_encapsulation and postpull_rcsum for the Ethernet
      header to work properly with checksum complete.
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    • Tom Herbert's avatar
      net: add skb_pop_rcv_encapsulation · e5eb4e30
      Tom Herbert authored
      This function is used by UDP encapsulation protocols in RX when
      crossing encapsulation boundary. If ip_summed is set to
      CHECKSUM_UNNECESSARY and encapsulation is not set, change to
      CHECKSUM_NONE since the checksum has not been validated within the
      encapsulation. Clears csum_valid by the same rationale.
      Signed-off-by: default avatarTom Herbert <therbert@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>