Rishi Varma is departing as general counsel of Hewlett Packard Enterprise to become chief legal officer of agricultural giant Cargill.