From: "Mcnamara, John" <john.mcnamara@intel.com>
To: Tero Aho <tero.aho@coriant.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 2/3] pcap: add support for jumbo frames
Date: Tue, 28 Apr 2015 13:52:08 +0000 [thread overview]
Message-ID: <B27915DBBA3421428155699D51E4CFE2F16E53@IRSMSX103.ger.corp.intel.com> (raw)
In-Reply-To: <1425044560-23397-3-git-send-email-tero.aho@coriant.com>
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Tero Aho
> Sent: Friday, February 27, 2015 1:43 PM
> To: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH 2/3] pcap: add support for jumbo frames
>
> Extend eth_pcap_rx and eth_pcap_tx to support jumbo frames.
> On receive side read large packets into multiple mbufs and on the transmit
> side do the opposite.
>
> +eth_pcap_tx_jumbo(pcap_t *pcap,
> + struct rte_mbuf *mbuf) {
> + u_char data[ETHER_MAX_JUMBO_FRAME_LEN];
> + uint16_t data_len = 0;
> +
> + while (mbuf != NULL) {
> + /* There is no writev style function in libpcap, */
> + /* we unfortunately have to copy data to a buffer. */
> + rte_memcpy(data + data_len, rte_pktmbuf_mtod(mbuf, void
> *),
> + mbuf->data_len);
> + data_len += mbuf->data_len;
> + mbuf = mbuf->next;
> + }
Hi Tero,
Not sure if it is possible in practice to overflow data[ETHER_MAX_JUMBO_FRAME_LEN] but there should probably be a check.
John.
--
next prev parent reply other threads:[~2015-04-28 13:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-27 13:42 [dpdk-dev] [PATCH 0/3] pcap pmd improvements Tero Aho
2015-02-27 13:42 ` [dpdk-dev] [PATCH 1/3] pcap: utilize underlying real interface properties Tero Aho
2015-04-28 13:49 ` Mcnamara, John
2015-02-27 13:42 ` [dpdk-dev] [PATCH 2/3] pcap: add support for jumbo frames Tero Aho
2015-04-28 13:52 ` Mcnamara, John [this message]
2015-06-10 9:08 ` [dpdk-dev] [dpdk-dev,2/3] " Maxim Uvarov
2015-06-10 9:43 ` Mcnamara, John
2015-02-27 13:42 ` [dpdk-dev] [PATCH 3/3] pcap: add byte and error counters into statistics Tero Aho
2015-04-28 14:00 ` Mcnamara, John
2015-02-27 13:50 ` [dpdk-dev] [PATCH 0/3] pcap pmd improvements Thomas Monjalon
2015-04-28 10:09 ` Thomas Monjalon
2015-04-28 12:09 ` Mcnamara, John
2015-04-29 8:29 ` Nicolas Pernas Maradei
2015-04-28 12:27 ` Mcnamara, John
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=B27915DBBA3421428155699D51E4CFE2F16E53@IRSMSX103.ger.corp.intel.com \
--to=john.mcnamara@intel.com \
--cc=dev@dpdk.org \
--cc=tero.aho@coriant.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).