examples: minor changes
[dpdk.git] / examples / l2fwd / main.c
index 07aaab8..2d94366 100644 (file)
@@ -1,7 +1,7 @@
 /*-
  *   BSD LICENSE
  * 
- *   Copyright(c) 2010-2013 Intel Corporation. All rights reserved.
+ *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
  *   All rights reserved.
  * 
  *   Redistribution and use in source and binary forms, with or without
@@ -163,6 +163,11 @@ static const struct rte_eth_txconf tx_conf = {
        },
        .tx_free_thresh = 0, /* Use PMD default values */
        .tx_rs_thresh = 0, /* Use PMD default values */
+       /*
+       * As the example won't handle mult-segments and offload cases,
+       * set the flag by default.
+       */
+       .txq_flags = ETH_TXQ_FLAGS_NOMULTSEGS | ETH_TXQ_FLAGS_NOOFFLOADS,
 };
 
 struct rte_mempool * l2fwd_pktmbuf_pool = NULL;
@@ -226,7 +231,7 @@ print_stats(void)
        printf("\n====================================================\n");
 }
 
-/* Send the packet on an output interface */
+/* Send the burst of packets on an output interface */
 static int
 l2fwd_send_burst(struct lcore_queue_conf *qconf, unsigned n, uint8_t port)
 {
@@ -248,7 +253,7 @@ l2fwd_send_burst(struct lcore_queue_conf *qconf, unsigned n, uint8_t port)
        return 0;
 }
 
-/* Send the packet on an output interface */
+/* Enqueue packets for TX and prepare them to be sent */
 static int
 l2fwd_send_packet(struct rte_mbuf *m, uint8_t port)
 {