1. 11 Jul, 2018 4 commits
    • Bart Van Assche's avatar
      RDMA/ocrdma: Make ocrdma_destroy_qp() easier to analyze · beae9eb5
      Bart Van Assche authored
      This patch does not change any functionality but avoids that sparse
      reports the following:
      
      drivers/infiniband/hw/ocrdma/ocrdma_verbs.c:1818:31: warning: context imbalance in 'ocrdma_destroy_qp' - different lock contexts for basic block
      
      Compile-tested only.
      Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
      Cc: Selvin Xavier <selvin.xavier@broadcom.com>
      Cc: Devesh Sharma <devesh.sharma@broadcom.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      beae9eb5
    • Arnd Bergmann's avatar
      infiniband: i40iw, nes: don't use wall time for TCP sequence numbers · 07f3355d
      Arnd Bergmann authored
      The nes infiniband driver uses current_kernel_time() to get a nanosecond
      granunarity timestamp to initialize its tcp sequence counters. This is
      one of only a few remaining users of that deprecated function, so we
      should try to get rid of it.
      
      Aside from using a deprecated API, there are several problems I see here:
      
      - Using a CLOCK_REALTIME based time source makes it predictable in
        case the time base is synchronized.
      - Using a coarse timestamp means it only gets updated once per jiffie,
        making it even more predictable in order to avoid having to access
        the hardware clock source
      - The upper 2 bits are always zero because the nanoseconds are at most
        999999999.
      
      For the Linux TCP implementation, we use secure_tcp_seq(), which appears
      to be appropriate here as well, and solves all the above problems.
      
      i40iw uses a variant of the same code, so I do that same thing there
      for ipv4. Unlike nes, i40e also supports ipv6, which needs to call
      secure_tcpv6_seq instead.
      Acked-by: default avatarShiraz Saleem <shiraz.saleem@intel.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      07f3355d
    • Bart Van Assche's avatar
      RDMA/nes: Avoid complaints about unused variables · 59b851db
      Bart Van Assche authored
      Avoid that the compiler reports the following when building with W=1:
      
      drivers/infiniband/hw/nes/nes_utils.c: In function 'nes_arp_table':
      drivers/infiniband/hw/nes/nes_utils.c:689:9: warning: variable 'tmp_addr' set but not used [-Wunused-but-set-variable]
        __be32 tmp_addr;
               ^~~~~~~~
      drivers/infiniband/hw/nes/nes_hw.c: In function 'flush_wqes':
      drivers/infiniband/hw/nes/nes_hw.c:3840:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
        int ret;
            ^~~
      drivers/infiniband/hw/nes/nes_verbs.c: In function 'nes_setup_virt_qp':
      drivers/infiniband/hw/nes/nes_verbs.c:811:6: warning: variable 'pbl_entries' set but not used [-Wunused-but-set-variable]
        u32 pbl_entries;
            ^~~~~~~~~~~
      drivers/infiniband/hw/nes/nes_verbs.c: In function 'nes_dereg_mr':
      drivers/infiniband/hw/nes/nes_verbs.c:2487:6: warning: variable 'minor_code' set but not used [-Wunused-but-set-variable]
        u16 minor_code;
            ^~~~~~~~~~
      drivers/infiniband/hw/nes/nes_cm.c: In function 'mini_cm_recv_pkt':
      drivers/infiniband/hw/nes/nes_cm.c:2570:20: warning: variable 'tmp_saddr' set but not used [-Wunused-but-set-variable]
        __be32 tmp_daddr, tmp_saddr;
                          ^~~~~~~~~
      drivers/infiniband/hw/nes/nes_cm.c:2570:9: warning: variable 'tmp_daddr' set but not used [-Wunused-but-set-variable]
        __be32 tmp_daddr, tmp_saddr;
               ^~~~~~~~~
      drivers/infiniband/hw/nes/nes_cm.c: In function 'cm_event_connected':
      drivers/infiniband/hw/nes/nes_cm.c:3578:22: warning: variable 'raddr' set but not used [-Wunused-but-set-variable]
        struct sockaddr_in *raddr;
                            ^~~~~
      drivers/infiniband/hw/nes/nes_cm.c: In function 'cm_event_reset':
      drivers/infiniband/hw/nes/nes_cm.c:3753:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
        int ret;
            ^~~
      Signed-off-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
      Cc: Faisal Latif <faisal.latif@intel.com>
      Cc: Tatyana Nikolova <Tatyana.E.Nikolova@intel.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      59b851db
    • Jason Gunthorpe's avatar
      RDMA/cxgb4: Restore the dropped uninitialized_var · 23ff6ba8
      Jason Gunthorpe authored
      In some configurations even gcc 7 cannot unravel this complexity and still
      throws a warning.
      
      Fixes: 4ab39e2f ("RDMA/cxgb4: Make c4iw_poll_cq_one() easier to analyze")
      Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
      Reviewed-by: default avatarBart Van Assche <bart.vanassche@wdc.com>
      Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
      23ff6ba8
  2. 10 Jul, 2018 6 commits
  3. 09 Jul, 2018 26 commits
  4. 04 Jul, 2018 4 commits