It’s a common mistake, and one that slipped by me recently, to describe the firing of three volleys of 7 rifles as at military funerals as a 21-gun salute. It’s not.
A 21-gun salute is fired by pieces of artillery, not by rifles. According to the Navy’s History Division, “Today, the national salute of 21 guns is fired in honor of a national flag, the soverign or chief of state of a foreign nation, a member of a reigning royal family, and the President, ex-President, and President-elect of the United States. It is also fired at noon of the day of the funeral of a President, ex-President, or President-elect, on Washington’s Birthday, Presidents Day, and the Fourth of July. On Memorial Day, a salute of 21 minute guns is fired at noon while the flag is flown at half mast.”
The rifle salute can be described as a “three-volley salute”.

What seems to confuse so many folks is that civilians tend to think of a rifle as a gun – whereas gun has a more precise meaning as a piece of artillery.