aboutsummaryrefslogblamecommitdiffstats
path: root/drivers/infiniband/core/cma.c
blob: 25f2b70fd8efb1e29de3b4d93a22a1aba411af13 (plain) (tree)
1
2
3
4
5
6
                                                   


                                                                        
                                                                            
                                                                   






                             
                       
                         
                             
                       
                         
                      
 

                              
                    
                     

                          


                            
                              
                    


                          
                       
 
                      
                     
 




                                            
                                             
                             
                                                      
                                   
                                                              
 


















                                                              
                                                                             







                                                                      













                                                                      












                                                               















                                                                             



























                                                                      
                                                  
                                                                        






                                      
                                     



                                       
                                  
 
                   



                               






                                                     

                                                                          
 

                                                    

                         
                                       
                         
                                       
                           
                                         
                        
                                      




                            


                                        


                                         
                                                  
                                                  

  
                       
                                    



                                       







                                                         
                                                                     

                                                                   
                                                   
 
                                                          

 
                                                          
                                                                                
 
                                                   
 
                                 

 

                                                                       
 
                                                   
 
                           

 



                          




                                            






















                                                                        
                                                       










                                                                                  
                                                       












                                                                            


















                                                                                  




                                                            





                                                                               
 






                                           
                                     
                                      
                                           

  


                                     

                                          


                                      





                                      





                                      


                            

                              





                                             
                    



                                   
                        
 
                     

                                                    
                                 

                               

                     
                 

  
                                                                             










                                                         
                                                                          










                                                      

                                                                   

                            
                               







                                                      
                                                          








                                                                  
                                                                                
 

















                                                                             

                                                               
 
                             

                                             

                                                                    
                                                         



                                                  

 








                                                                            
                                              




                                                    







                                                                                   
                                                            
 
                          


                                        
                            

 














                                                                            
                                                                  



                                      


                                                  
                         





                                     

                                 
                         
                        
                                              

                           





                                                                              






                      











                                                                                     
                                                        







                                                                        




                                                    
 

                                                                          
                                            
                                          
                                       
 


                                                                                
                                                                               
                                        

                                                                              
                                        
 
                                                                           
                                                                       
                          
                                                
                
                                          
         
 
                                                                             

                              

                         
 




                                                                   

 
















                                                                                
                          












                                                                        
                                                            


















                                                                               


















































                                                                                
 
                                                                          
                                            
                                   
                                  
                          
                         
                
 
                                                      


                                            
                                             


                                                            
 

                                           

                                                            
                                                               




                                                       
         
 
                                                       
                                                                                
                                                                 

                                                                
 
                                                                       
                                                                            
                                                                               
                                                 
                                                            

                                                                       
                                         
                         

                 




                                                    
                            


                   








                                                                               
             
                                      






                                                            
                          
                                                       
                                                                       
                                                                

                                         


                                                                                  

                                                                                      

                                                                    
                                   


                                                                       
                                                                 



                                                                            

                                                                   

                                                          
                                                                 
                                                   



                                 

                            


                                            


                                                           



                                                                 





                                                         

                                                                        
                                                                               
                                                                                






                                                       
                                                      
                                                
                                      


                                                  
                                      
                                 
                                     
                                           
                                       
                                       

                                          
                                            
                                              
                                          
                                                                     
                                                           
                                       


                            
                                
 
                                                                            

                                  
                              
 

                                                                       


                           













                                                                     

 
                                                                              

                                  
                              

                                       


                                                                       
 
                                                        

 










                                                               
                                              



                                            
                                     


                                                    




                                     









                                           






                                                               


                               

                                                                



                                  




                                       


                                                               
                                                                       
                
                         
 
                                                                   
                
                         

                                      
                                                                       
                
                         
 

                                                               

                                                                             



                                                                   

 

                                                                



                                  




                                       

                                      
                                                                       
                
                         
 

                                                                    



                                                                   

 
                                                             

                                  
                
 




                                       

                                      



                                                                  

 




                                                                             

                 
                                                                      
                              

                                                  

                                                                           
                                                              





                                                                    
                                               
                                               


                                   








                                                    



                                                                        
                    

                                                               
                                                       
                                                                             



                                                                                  
 

                                                           
                                                              
                                         
                                                     



                                                                            

                                                         
              
                              
 


                                                                    



                                 
                                                             
 



                                                                                      
                                                                                
                   
                                                                            
                
                             


         
                                                                 
 

                                  

                                                                       
                      

                                                                   
                   

                                                                 
                
                             
         

 
                                                            



                                                              
                                                                               





                                             

















                                                                            


                                                                            


         
                                                   
 



                                  
                                                               
                      
                                                                 






                                                                     

 
                                                           
 
                               

 

                                                       

                                                                
 


                                                                           






                                                               
                                                       








                                                                      
         







                                                               
         
 
 

                                                           

                                                  
 
                       




                                                                  
         
 
                       




                                                                  
         

 

                                                            

                                                  
 
                       




                                                       
         
 
                       




                                                       
         

 
                                                      
 

                                            
 

                                                      
                                                               



                                              




                                            

                                                           
                                      
               

                                                                             

                      

                                                                              

                      
                                     
         
 
                 

 

                                                       

                                                                













                                                                                














                                                                       
                                                                      
                                                                             



                                                                                                                      





                                                                
                                                   



                                                                                                                              







                               























                                                                     
                                                      













                                                                                
                                                       




































                                                                               



                                                                
                                







                                                                     








                                                      

 
                                                                             
                                                                   
 


                                                                              



                                                                        

                                                               


                                    





                                                                          





                                        
                                                                          







































                                                                            




                                                                     
                                                    

 










                                                                               

                                                               
                                                             
 
                                                       

                     
                                                      
                                                                      
                                                           
 
          





                                                                        








                                                                     
















                                                                              
                                                                          




                                                                              

                                                                       







                                                           
                               

                                                        
                                              
                                                 
 

                                         

                
                                               


                                    
                                                  

                                                         
                                                            
                                        
                        
                                                  


                 



























                                                                                 

                                                                              




                                                         
                                                                         


                                                                               

                          
                                          


                                  


                       
                                                                      
 
                                                                         

 

                                                             
                                                                       

                                                                              


         



                                                               



                                                                             





                                                                              






                                                                             




                                                                 
                                                          

                        
                                

                                                                   
                                 

                                          
                            
                                                                             









                                                              
                                                              






                                              
                                                                   




                                 


                                                                    







                                                                               



                                         







                                                                
                                                               
                                                              

                                                               
                        
                                                             
                 


         


                                           
                                 

                                                               
                                                      

                                             






                                                                           
                                         
                               
                                                            
                                              
                                                                    
                                                                   
                                              
                                                                    
                 
                                             
                                         





                                            


                                                  
                                          



                                                                             
                                                     







                                                        
                                               


                            
                                               








                                                         
                                                                                                 
                                   




                                                                     
                                                               
                                                                                











                                                                              

                                                             

                                                         
                                        
                    
 
                                            
                                                      
                                                  
                                                      

                                                   



                                  

                                                        

                                


                                                                           
                                     


                                                                                  
                        
                                                                     
                 

                                                                         

                                

                                                        

                              
                                                             

                                 

                                                            
                                 
                                                         

                                 

                                                          



                                  

                                                                                                                  
                                           



                                                                                

                      
                                                                



                                        
                                                              


                                                                      
                                                      
                                                      



                                              
                                              


                   
                               


                                                      
 
                                               


                                        
                                                                               
                                                                         

                                                                  
                
 

                                                                             
                                                                         

                                                                            
                       
                            
 
                                                               


                                                                          
                         


                                                                        

                                                                          
                          
                         
 
                                


                                                                           
                      
                                                                   
                









                                                                                                

                                                                      
 
                                         
                       
 
    
                            


                    
                               


                                                     
 
                                                     

                                        
                                                                               
                                                             

                



                                                                                


                            
                                                               



                                                                          

                         
                      
                                                                         
                





                                                                           
         
 
                                         





                            
                                                               
                                                                                












                                                                                  

                                                                       
 
                                                           





                                                                      

                                                                 
 
                                                           
                                        
                                     
                                   

                  
 
                                                                          


                                          
                                                                  


                                 
 

                                                 
                                    
                          
         
 
                                                 
                                                    
                                                         
                                                                               



                                                                              
                                                                                


                                                                         

                              
                          

         
                                                                         
                                                           
                
                          




                                           




                                                                          
                                                              

                          




                                                                    

                                                 



                                                                   
                              

                                 
                 
 

                              

                                                              
     
                                              
                                              
     
                                                

                                              




                                 


                   
                                                                        
 


                                                              
                                                                              
 
                                   
 


























                                                                              


                                                                               
                                        
                    

                                                                           
 


                                              


                                  
                                                         

                                       



                                                    

                                           
                                                                

                                                                             











                                                                  

                                     
                                                        

                                                                     

                      
                         

         



                                                                       


                                                                      
                                                      
                                                      



                                              
    
                                              







                                                            
                                        
                                

                                                                           
 





                                                                       
                                   



                                               

                                                       




                                                                           
                                



                                                                      
                                                                         
                                         
 
                                                                         
                  
                                                      



                                           
                                                     
                  
                                                      







                                           

                                                                    
 




                                                                          
                                                              


                                                     
                                                      
                                                      
                                                        
                                      
                                              
                           

         
                                              
                              
 
    
                                                


                   

                                                         
                              
                            
                      
 

                                                         

                                                             

                                   
                               
 
                 

 


                                                                      






                                                 
 
                               
                                       
                               
 

                                                                     










                                                       














                                                              
                                                              

                
                                                                                

                       

                                                                               




                                                                   
                                                

                                                                
 
                                                 
                                                                        

                                       
                                              

                                                


                                                

                                                                         












                                                              





                                                               
                                


                                     








                                                                            


                                                                          

















                                                               
                                                                       










                                             

                                                        
                                                              
                                            

                                                                                               




                                        

                                                                              
 
                                                                          
                                    

                                  
                                

                                              




                                                                      


                                                                
                               
                                

                                                                         




                                                                          

                                      

                                                                     

                      
                                                                     

                                                                                       





                                                                                     
         
 
                                                                              



                                                                               



                                                               
                                                       
 
                                                                           


                                                   
                                            



                                                                      
                                                      


                            
                                              





                                              






                                                                                     

                                                     


                                                                    
                                                      










                                              



















                                                                        

                                                                








                                                      
                                                   



















                                                                       













































                                                                               
                                                    



                                                                       

                                                  

                                        
                                


                                                               

                                                          

                               
                                                                 
                                                 




                                  








                                                                
                                
                 



                                  
    
                                                                              

                   
                                
 
                                                                






                                                 
                                                   



                                        
                                                                   
 

                               
                                           


                                                         
































                                                                              
                              
















                                                                         

 





                                                                  
                                
 


                                                                                       
 
 



                                                 







                                                                       
                                                        




                              



                                                                        
 
                                                                                      
                                                                       

                                                                     
                                               


                                                    

                                                        




                                                              









                                                                             




                                    
                                                   











                                        
                                                                       




                                                               
                                                                                


                                       
                                                     
                                                                
                                                              

                                                               
                                                    
            
                              
 




                         
                                                                           




                                  
















                                                                                        

                                                             
                                             
                         
                                      



                 
                       
                          

                                                       
                                                        





                                                                       

                                                                                         






                                                  


                              
 
              

           
                                                          






                                                               
                                                  
                                                        


                                                                   


                                                                 
                                                








                                                                       
                                        

                                         
 
                                            

                                                       
                         
 







                                                                              
                                           
                                                            


                                                                                                          
                            

                                                                                                       

                     

                                                                     

                                                                  
                                 

                                                       
              
                                                          
 
                                                              
                                                      
                                                      



                                              
                                              




                                                                
                         











                                                 

                                                                   
 
                                                  






                                        

















                                                                                        
                                                  






                                        
                                                                          
                                                         
 

                                                                        
                                                          

                                                      




                                                                                                


                                                                            


                                            


                                                                       
                                                                                




                                                               
                                             
                                                            
                        


                                   
                                                       

                               
                                                                            

                               
                                                                          
                                     
                                                    



                                                           



                                                                              

                 




                         
                                                                       



                                 







                                                               
                                                      









                                                      



















                                                                                     


                                                           



                                
 
                                     
















                                                                             



                                                           
                                                      
                                                                               

                                         
                
 
                                                           


                               

                                                                              

                         

                           
                               

                                          
    
                         
                                                     
 
 
















                                                                   

                                               









                                                     

                                               







                                                   
                                                          
                                                              
 


                                           
                                                              
 
                                                    
                                     
                                                
      












                                                                        







                                                                         
         






                                                    

 







                                                                             

                                       
                                         
 
                                     
                                                                

                                      
 


                                                                     
 
                                                








                                                                 
         


                 
                                                    
                                                        




                                         
                                                      


                                                               
                                                                               





















                                                                             

                                                   
 
                                 
                         
                         
                           
                        
                                      
                

                         


         

                                                 
 
                                        


                                
                                                           




                                                                                   
                                


                                                                                         
                                 


                                                                                         
                                 

         









                                                                                              
                                    

                
                                         





                                                 
                          
                                                
                                                      






                                                


                                                              
                           





                                            




                                                                      






                                                     





                                                               
                                             

                                                                



                                   
                                                                        









                                               
                                                    


                                                     
                                                           


                                                              
                        








                                           
                                                                   



                           



                                                                
                                
 

                                                                        


                                                               
                                                                      

                               



                                                                  
                                                                  
                                  
                                                                         
                        

                                  
                                                         

                                  

         


                                                             
                           




                                                                              
      
         


                                           

                                    
                          

                 
     

                                         
                                         
     
                                                                 



                              
                                                                     
 
                                
 

                                           
                                             

                                                

                                                                    
 



                                                                   
                                                     

                                                 

                                                                     
 



                                                        



                 
                                                       
                                                                   

                                                         
                                        

                                                               

                    


                                              











                                                                                   

                                                                                                 

                              
                                                       
                          
                                                                                                          
                                                               
                                           

                              


                                                                     

                                                                  





                                                        
                                                                




                                                              

                                                      


                                                                      
                                                      
                                                      



                                              
                                              






                                                                 
                            
                           

                  
 
                                    

                                                                     


                                                                
                                   

                                                                         

                                       
                                    
         

                                                                     

                                                                       
 

                                                            

                                 
                                                
         
 



                                                                      

                         
                               
 
                                              
                                                                  
                                                                                  








                                                            
                            


                   





                                                             
                            

                  

                                    
                                               
                                                                     


                                                                






                                                                         




                                                                       


                                                                          

                         
                               

                                   





                                                            




                                                         

                                                                        
                                                                                  
                                     
                                          



                                                                  

                                                                        






                                                                 

                                     


                                         



                            



                                                             



                                                                             

                                      
 
                                  
                                          

                                  



                                                          
 
                                                     

                         
 







                                                                                     
                                               
         

                                              
                  


                                         


                   





                                                                           
                                                                             



                                                     


                                               
                                                       
                                             


                                                                      
                                                            
                                                          
            
                              




                         
                                                                        







                                                            
                
 


                                                     
 


                                                     







                                                                  

                                                    
                                                                        

                                       


                                                      

 





                                                         


                               
                                                     














                                                                 
                                                             
                                                                     


                                                                            
                



                                        
                                                  

                                   
                                             
                                         






                                                            

                                                                            




                                                               
 
                                                      
 
                                                



                                                     


                                               
                                                       


                                                                                 
                                                                         



                                                                                      
                                                                    





                                                                         
                                                            
                                                         
            
                              





                            
                                   


                                 
                             
 





                                                                
                               













                                                             






                                                                
                               

                               
                                                       
                                             
                                                                           




                                                                                
                                                              

                                                                   
              
                              
 









                                                               
                               

                               
                                                       
                                                 

                                 


                                                                    
                                                              
                                                             
              
                              
 




                               



                                                                           
                                        
                    

                              



                                                    
 

                                                                                 


                                                                                                       
                                       
                                        
                                                                              
                                                                           
                           


                                                                                                          
                                         
 


                                                  


                                                         
                                                                                



                                                                                 
                                                           







                                                                        

                                                                       

                                      



                                                              

                                                      
                  
                                                      
                                                      


                                              
 
    
                                              













                                                                          
                                                                               


                                                                               

                                                                                     
                                                 



                                                                              
                
                                                                                

                                                                           

















                                                                              



                                       
                                                                        
                                              
                                                    
                                                           

                                        



                                                                      



                                                                                                                       
                                   
         






                                                                             

                                                      



                                                               
 



                                                                               
                                                 

 











                                                                                      

                                                                        








                                                                



                                                                            


















                                                                          
                    

                                                             
                                  


                                                                    













                                                                               


                                                                            





                                                                        
                                                                               






                                                            
 
                                         

                                                                                


                                                                                      
                         




                                                           
                      


                                                

                          

                                                                        














                                                        
                                                                     
                                                     




                                        


                               
                                                               

                                                      





                                             
                                                      

                              
                                    
 
                                                           

                                                           


                                                                 
                                                         


                                     
                              
                             
         







                                               











                                                                       
                                                                     





                                                                            
                                                                                         


                                                                       
                                                                          

                                                                       
                                                                                  
                                                                     
                         






                                        






                                                                                      
                                                        
                                                     
                                                                             

                                                                          














                                                                                
                                         
 
                                                                   



                                        


                                             
                                        


















                                                                       



                                                 

                                         





                                                       


                                                                               








                                                                               
                                        

                                                                       
                                                                        




                                                                                
                                                                           
         










                                                            









                                         



                                                             
                                        
                                 
                    

                                                      

                                                          


                                             
                                            

                                                          
                                                       
                         
 
                                                   



                                                              



                                                          


                                        




                                                                   
                                                
                                              


                                               
                                                                            











                                                      
                                                                       
 
                                                 
 







                                    
                                         
                                         


                       



                                                    



                                   







                                                    



                                              








                                                         
                                
 
                
 
                                                                    


                               



                                                             
                                          
                                             
 


                                              
 


                                  
 

                 

                                          
    
                                               
                                            
       



                                  
                                    
 
                            
                                          
                                               
                                            
                                                         
                                  



                         
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
/*
 * Copyright (c) 2005 Voltaire Inc.  All rights reserved.
 * Copyright (c) 2002-2005, Network Appliance, Inc. All rights reserved.
 * Copyright (c) 1999-2019, Mellanox Technologies, Inc. All rights reserved.
 * Copyright (c) 2005-2006 Intel Corporation.  All rights reserved.
 */

#include <linux/completion.h>
#include <linux/in.h>
#include <linux/in6.h>
#include <linux/mutex.h>
#include <linux/random.h>
#include <linux/igmp.h>
#include <linux/xarray.h>
#include <linux/inetdevice.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <net/route.h>

#include <net/net_namespace.h>
#include <net/netns/generic.h>
#include <net/tcp.h>
#include <net/ipv6.h>
#include <net/ip_fib.h>
#include <net/ip6_route.h>

#include <rdma/rdma_cm.h>
#include <rdma/rdma_cm_ib.h>
#include <rdma/rdma_netlink.h>
#include <rdma/ib.h>
#include <rdma/ib_cache.h>
#include <rdma/ib_cm.h>
#include <rdma/ib_sa.h></