1. 23 9月, 2016 10 次提交
    • O
      net/mlx5: E-Switch, Set the vport when registering the uplink rep · 9deb2241
      Or Gerlitz 提交于
      Set the vport value in the PF entry to be that of the uplink so
      we can use it blindly over the tc / eswitch offload code without
      translating it each time we deal with the uplink representor.
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9deb2241
    • O
      net_sched: act_vlan: add helper inlines to access tcf_vlan info · 53e89941
      Or Gerlitz 提交于
      Needed e.g for offloading drivers to pick the relevant attributes.
      Signed-off-by: NOr Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      53e89941
    • E
      net_sched: sch_fq: account for schedule/timers drifts · fefa569a
      Eric Dumazet 提交于
      It looks like the following patch can make FQ very precise, even in VM
      or stressed hosts. It matters at high pacing rates.
      
      We take into account the difference between the time that was programmed
      when last packet was sent, and current time (a drift of tens of usecs is
      often observed)
      
      Add an EWMA of the unthrottle latency to help diagnostics.
      
      This latency is the difference between current time and oldest packet in
      delayed RB-tree. This accounts for the high resolution timer latency,
      but can be different under stress, as fq_check_throttled() can be
      opportunistically be called from a dequeue() called after an enqueue()
      for a different flow.
      
      Tested:
      // Start a 10Gbit flow
      $ netperf --google-pacing-rate 1250000000 -H lpaa24 -l 10000 -- -K bbr &
      
      Before patch :
      $ sar -n DEV 10 5 | grep eth0 | grep Average
      Average:         eth0  17106.04 756876.84   1102.75 1119049.02      0.00      0.00      0.52
      
      After patch :
      $ sar -n DEV 10 5 | grep eth0 | grep Average
      Average:         eth0  17867.00 800245.90   1151.77 1183172.12      0.00      0.00      0.52
      
      A new iproute2 tc can output the 'unthrottle latency' :
      
      $ tc -s qd sh dev eth0 | grep latency
        0 gc, 0 highprio, 32490767 throttled, 2382 ns latency
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fefa569a
    • B
      sfc: check async completer is !NULL before calling · 429baa6f
      Bert Kenward 提交于
      Add a NULL check before calling asynchronous MCDI completion functions
      during device removal.
      
      Fixes: 7014d7f6 ("sfc: allow asynchronous MCDI without completion function")
      Signed-off-by: NBert Kenward <bkenward@solarflare.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      429baa6f
    • D
      Merge branch 'sctp-fix-gap-ack-blocks' · 88e4f759
      David S. Miller 提交于
      Marcelo Ricardo Leitner says:
      
      ====================
      sctp: fix the handling of SACK Gap Ack blocks
      
      sctp_acked() is using 32bit arithmetics on 16bits vars, via TSN_lte()
      macros, which is weird and confusing.
      
      Once the offset to ctsn is calculated, all wrapping is already handled
      and thus to verify the Gap Ack blocks we can just use pure
      less/big-or-equal than checks.
      
      Also, rename gap variable to tsn_offset, so it's more meaningful, as
      it doesn't point to any gap at all.
      
      Even so, I don't think this discrepancy resulted in any practical bug.
      
      This patch is a preparation for the next one, which will introduce
      typecheck() for TSN_lte() macros and would cause a compile error here.
      Suggested-by: NDavid Laight <David.Laight@ACULAB.COM>
      Reported-by: NDavid Laight <David.Laight@ACULAB.COM>
      Signed-off-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      88e4f759
    • M
      sctp: improve how SSN, TSN and ASCONF serial are compared · 182691d0
      Marcelo Ricardo Leitner 提交于
      Make it similar to time_before() macros:
      - easier to understand
      - make use of typecheck() to avoid working on unexpected variable types
        (made the issue on previous patch visible)
      - for _[lg]te versions, slighly faster, as the compiler used to generate
        a sequence of cmp/je/cmp/js instructions and now it's sub/test/jle
        (for _lte):
      
      Before, for sctp_outq_sack:
      	if (primary->cacc.changeover_active) {
          1f01:	80 b9 84 02 00 00 00 	cmpb   $0x0,0x284(%rcx)
          1f08:	74 6e                	je     1f78 <sctp_outq_sack+0xe8>
      		u8 clear_cycling = 0;
      
      		if (TSN_lte(primary->cacc.next_tsn_at_change, sack_ctsn)) {
          1f0a:	8b 81 80 02 00 00    	mov    0x280(%rcx),%eax
      	return ((s) - (t)) & TSN_SIGN_BIT;
      }
      
      static inline int TSN_lte(__u32 s, __u32 t)
      {
      	return ((s) == (t)) || (((s) - (t)) & TSN_SIGN_BIT);
          1f10:	8b 7d bc             	mov    -0x44(%rbp),%edi
          1f13:	39 c7                	cmp    %eax,%edi
          1f15:	74 25                	je     1f3c <sctp_outq_sack+0xac>
          1f17:	39 f8                	cmp    %edi,%eax
          1f19:	78 21                	js     1f3c <sctp_outq_sack+0xac>
      			primary->cacc.changeover_active = 0;
      
      After:
      	if (primary->cacc.changeover_active) {
          1ee7:	80 b9 84 02 00 00 00 	cmpb   $0x0,0x284(%rcx)
          1eee:	74 73                	je     1f63 <sctp_outq_sack+0xf3>
      		u8 clear_cycling = 0;
      
      		if (TSN_lte(primary->cacc.next_tsn_at_change, sack_ctsn)) {
          1ef0:	8b 81 80 02 00 00    	mov    0x280(%rcx),%eax
          1ef6:	2b 45 b4             	sub    -0x4c(%rbp),%eax
          1ef9:	85 c0                	test   %eax,%eax
          1efb:	7e 26                	jle    1f23 <sctp_outq_sack+0xb3>
      			primary->cacc.changeover_active = 0;
      
      *_lt() generated pretty much the same code.
      Tested with gcc (GCC) 6.1.1 20160621.
      
      This patch also removes SSN_lte as it is not used and cleanups some
      comments.
      Signed-off-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      182691d0
    • M
      sctp: fix the handling of SACK Gap Ack blocks · a3007446
      Marcelo Ricardo Leitner 提交于
      sctp_acked() is using 32bit arithmetics on 16bits vars, via TSN_lte()
      macros, which is weird and confusing.
      
      Once the offset to ctsn is calculated, all wrapping is already handled
      and thus to verify the Gap Ack blocks we can just use pure
      less/big-or-equal than checks.
      
      Also, rename gap variable to tsn_offset, so it's more meaningful, as
      it doesn't point to any gap at all.
      
      Even so, I don't think this discrepancy resulted in any practical bug.
      
      This patch is a preparation for the next one, which will introduce
      typecheck() for TSN_lte() macros and would cause a compile error here.
      Suggested-by: NDavid Laight <David.Laight@ACULAB.COM>
      Reported-by: NDavid Laight <David.Laight@ACULAB.COM>
      Signed-off-by: NMarcelo Ricardo Leitner <marcelo.leitner@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a3007446
    • W
      net_sched: check NULL on error path in route4_change() · 21641c2e
      WANG Cong 提交于
      On error path in route4_change(), 'f' could be NULL,
      so we should check NULL before calling tcf_exts_destroy().
      
      Fixes: b9a24bb7 ("net_sched: properly handle failure case of tcf_exts_init()")
      Reported-by: Nkbuild test robot <fengguang.wu@intel.com>
      Cc: Jamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NCong Wang <xiyou.wangcong@gmail.com>
      Acked-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      21641c2e
    • D
      d6989d4b
    • L
      Merge tag 'media/v4.8-7' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media · b1f2beb8
      Linus Torvalds 提交于
      Pull media fixes from Mauro Carvalho Chehab:
      
       - several fixes for new drivers added for Kernel 4.8 addition (cec
         core, pulse8 cec driver and Mediatek vcodec)
      
       - a regression fix for cx23885 and saa7134 drivers
      
       - an important fix for rcar-fcp, making rcar_fcp_enable() return 0 on
         success
      
      * tag 'media/v4.8-7' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (25 commits)
        [media] cx23885/saa7134: assign q->dev to the PCI device
        [media] rcar-fcp: Make sure rcar_fcp_enable() returns 0 on success
        [media] cec: fix ioctl return code when not registered
        [media] cec: don't Feature Abort broadcast msgs when unregistered
        [media] vcodec:mediatek: Refine VP8 encoder driver
        [media] vcodec:mediatek: Refine H264 encoder driver
        [media] vcodec:mediatek: change H264 profile default to profile high
        [media] vcodec:mediatek: Add timestamp and timecode copy for V4L2 Encoder
        [media] vcodec:mediatek: Fix visible_height larger than coded_height issue in s_fmt_out
        [media] vcodec:mediatek: Fix fops_vcodec_release flow for V4L2 Encoder
        [media] vcodec:mediatek:code refine for v4l2 Encoder driver
        [media] cec-funcs.h: add missing vendor-specific messages
        [media] cec-edid: check for IEEE identifier
        [media] pulse8-cec: fix error handling
        [media] pulse8-cec: set correct Signal Free Time
        [media] mtk-vcodec: add HAS_DMA dependency
        [media] cec: ignore messages when log_addr_mask == 0
        [media] cec: add item to TODO
        [media] cec: set unclaimed addresses to CEC_LOG_ADDR_INVALID
        [media] cec: add CEC_LOG_ADDRS_FL_ALLOW_UNREG_FALLBACK flag
        ...
      b1f2beb8
  2. 22 9月, 2016 30 次提交