1. A method for automatically selecting a forwarding approach on a per-module basis, the method comprising: for an input/output (I/O) module in a multi-I/O-module packet forwarding device, the I/O module including a longest prefix matching (LPM) table and a Internet protocol forwarding database (IPFDB): operating the I/O module in an LPM mode, wherein operating the I/O module in an LPM mode includes populating the IPFDB with entries corresponding to active hosts, populating the LPM table with entries from an IP routing table with routes learned from IP routing protocols, and routing layer 3 packets received by the I/O module using the IPFDB and LPM table of the I/O module: determining a capacity of the LPM table; determining a total number of IP routes in the IP routing table; determining a relationship between the total number of IP routes in the IP routing table and the capacity of the LPM table; and in response to determining that the total number of IP routes in the IP routing table has a predetermined relationship with the capacity of the LPM table, automatically switching the I/O module from the LPM mode to an IPFDB mode, where the IPFDB and the LPM table are populated with entries corresponding to active hosts and routing layer 3 packets received by the I/O module using the IPFDB and LPM table of the I/O module.