This seems to be a problem in the GMAC (SAME70 and probably other SAM devices) driver which will be corrected immediately.
As explained in the tcpip_mac.h, the function TCPIP_MAC_PacketTx() is required to return either TCPIP_MAC_RES_OK or an error code.
But inadvertently, as you discovered, the DRV_GMAC_PacketTx() returns the result of _MacTxPendingPackets() (which is wrong as that's just an internal result).
The driver is required to queue the packets to be transmitted in an internal queue ( a very cheap operation).
So the fix is, at the end of DRV_GMAC_PacketTx():
macRes = _MacTxPendingPackets(pMACDrv,queueIdx);
_DRV_GMAC_TxUnlock(pMACDrv);// return macRes;return TCPIP_MAC_RES_OK.
Regarding the 2nd point:
On another note, I also noticed that the stack does not seem to have a mechanism to retry sending pending Tx packets.
There is no queue for storing the pending TX packets in the stack. The driver, as explained above, takes care of that. So there's no modification needed in the stack code.
Thank you for finding the inconsistency in the GMAC driver.
The fix will be part of the next release.