IB/mthca: Safer max_send_sge/max_recv_sge calculation