First name and last name are reversed in flight ticket and boarding pass

I have a flight from India to USA and have port of entry in Chicago. In my flight ticket first name and last name got reversed. Fortunately I was able to get boarding pass. I would like to know if this will be a problem during immigration check in Chicago

No issues as the airlines should have corrected the traveler information which should match with your travel docs.