port: remove constant default MTU
authorMaciej Gajdzica <maciejx.t.gajdzica@intel.com>
Thu, 30 Apr 2015 12:02:32 +0000 (14:02 +0200)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 17 May 2015 21:46:56 +0000 (23:46 +0200)
p->mtu field should be used instead.

Signed-off-by: Maciej Gajdzica <maciejx.t.gajdzica@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
lib/librte_port/rte_port_frag.c

index ff0ab9b..dce33d5 100644 (file)
 
 #include "rte_port_frag.h"
 
-/* Default byte size for the IPv4 Maximum Transfer Unit (MTU).
- * This value includes the size of IPv4 header. */
-#define        IPV4_MTU_DEFAULT ETHER_MTU
-
 /* Max number of fragments per packet allowed */
 #define        IPV4_MAX_FRAGS_PER_PACKET 0x80
 
@@ -160,7 +156,7 @@ rte_port_ring_reader_ipv4_frag_rx(void *port,
                p->n_pkts--;
 
                /* If not jumbo, pass current packet to output */
-               if (pkt->pkt_len <= IPV4_MTU_DEFAULT) {
+               if (pkt->pkt_len <= p->mtu) {
                        pkts[n_pkts_out++] = pkt;
 
                        n_pkts_to_provide = n_pkts - n_pkts_out;