1. 23 9月, 2016 2 次提交
    • 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
    • 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
  2. 22 9月, 2016 4 次提交
  3. 21 9月, 2016 9 次提交
  4. 20 9月, 2016 13 次提交
  5. 19 9月, 2016 5 次提交
  6. 17 9月, 2016 5 次提交
  7. 16 9月, 2016 2 次提交