I think he should just call her “sir.”
If General Walsh was being disrespectful or using the term “ma’am” in a sarcastic or condescending tone, then Sen. Boxer would have had the right to chide him like this in a public forum. If this really bothered her, the mature thing to do would perhaps pull him aside privately during a break and ask that he not call her ma’am in a public space.
Gen. Walsh understands chain of command, which is why he complied immediately, even to a silly, immature request. Kudos to him. Sen. Boxer, not so much.
Any thoughts from vets out there?