From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxim Uvarov Subject: [PATCH] support jumbo frames for pcap vdev Date: Tue, 9 Jun 2015 13:15:23 +0300 Message-ID: <1433844923-29797-1-git-send-email-maxim.uvarov@linaro.org> To: dev@dpdk.org Return-path: Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by dpdk.org (Postfix) with ESMTP id 9B1D25A54 for ; Tue, 9 Jun 2015 12:15:30 +0200 (CEST) Received: by wgbgq6 with SMTP id gq6so9242376wgb.3 for ; Tue, 09 Jun 2015 03:15:30 -0700 (PDT) List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" PCAP PMD vdev is used mostly for testing. Increase snapshot len parameter provided to pcap_open_live() to accept packet more then 4096 (support jumbo frames for pcap pmd). Signed-off-by: Maxim Uvarov --- lib/librte_pmd_pcap/rte_eth_pcap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/librte_pmd_pcap/rte_eth_pcap.c b/lib/librte_pmd_pcap/rte_eth_pcap.c index eebe768..978c137 100644 --- a/lib/librte_pmd_pcap/rte_eth_pcap.c +++ b/lib/librte_pmd_pcap/rte_eth_pcap.c @@ -47,7 +47,6 @@ #include #define RTE_ETH_PCAP_SNAPSHOT_LEN 65535 -#define RTE_ETH_PCAP_SNAPLEN 4096 #define RTE_ETH_PCAP_PROMISC 1 #define RTE_ETH_PCAP_TIMEOUT -1 #define ETH_PCAP_RX_PCAP_ARG "rx_pcap" @@ -468,7 +467,7 @@ open_tx_pcap(const char *key __rte_unused, const char *value, void *extra_args) */ static inline int open_iface_live(const char *iface, pcap_t **pcap) { - *pcap = pcap_open_live(iface, RTE_ETH_PCAP_SNAPLEN, + *pcap = pcap_open_live(iface, RTE_ETH_PCAP_SNAPSHOT_LEN, RTE_ETH_PCAP_PROMISC, RTE_ETH_PCAP_TIMEOUT, errbuf); if (*pcap == NULL) { -- 1.9.1