Really, the central point that should be clear is that this is a question for lawyers. The GDPR is incredibly far-reaching.
If it means your website has to show a message ‘We transmit your info, but save nothing.’ It becomes a bit weird.
So I think you would have to notify the user that you are sending their IP address to the processor under legitimate interest and have a way for them to "object" to that use (i.e. turn off analytics). For legitimate interest, the objection can be after the fact, so having a configuration screen that stores a cookie that allows them to turn off analytics when they are on the site would probably do it.