DPDK patches and discussions
 help / color / mirror / Atom feed
From: Karmarkar Suyash <skarmarkar@sonusnet.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] Bug in outgoing packet with vmxnet3 with VLAN tagging
Date: Fri, 10 Oct 2014 20:01:50 +0000	[thread overview]
Message-ID: <F68D47BAAB943145B18773EDECE588EE0DBFFE1A@inba-mail02.sonusnet.com> (raw)

I meant in the below code snippet the function must be corrected to -

********************************
<<< file 1: /DPDK/DPDK-1.6.0/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c/1
>>> file 2: /DPDK/DPDK-1.6.0/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c
********************************
-----[289 changed to 289-290]-----
<                                                     if(txm->pkt.data_len > (hw->cur_mtu + ETHER_HDR_LEN)) {
---
>                                                     //if(txm->pkt.data_len > (hw->cur_mtu + ETHER_HDR_LEN)) {
>                                                     if(txm->pkt.data_len > (hw->cur_mtu + ETHER_HDR_LEN + 4 /* 4 bytes for VLAN */)) {

From: Karmarkar Suyash
Sent: Friday, October 10, 2014 6:17 PM
To: 'dev@dpdk.org'
Subject: Bug in outgoing packet with vmxnet3 with VLAN tagging

Hello All,

When a outgoing packet is sent with data Len more than 1514 which will be a case in VLAN (Max 1518 ) the packet is getting dropped because of the below code snippet. This looks incorrect as in case of VLAN .

FUNCTION NAME: vmxnet3_xmit_pkts

/* Needs to minus ether header len */
                                                if(txm->pkt.data_len > (hw->cur_mtu + ETHER_HDR_LEN)) {
                                                                PMD_TX_LOG(DEBUG, "Packet data_len higher than MTU\n");
                                                                rte_pktmbuf_free(tx_pkts[nb_tx]);
                                                                txq->stats.drop_total++;

                                                                nb_tx++;
                                                                continue;
                                                }


#define ETHER_ADDR_LEN  6 /**< Length of Ethernet address. */
#define ETHER_TYPE_LEN  2 /**< Length of Ethernet type field. */
#define ETHER_CRC_LEN   4 /**< Length of Ethernet CRC. */
#define ETHER_HDR_LEN   \
            (ETHER_ADDR_LEN * 2 + ETHER_TYPE_LEN) /**< Length of Ethernet header. */


But in case of VLAN the Ethernet header is 18 bytes. Does this mean we do not support VLAN for VMXNET3 PMD? Thanks.


Regards
Suyash Karmarkar

             reply	other threads:[~2014-10-10 19:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-10 20:01 Karmarkar Suyash [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-10-10 12:46 Karmarkar Suyash

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=F68D47BAAB943145B18773EDECE588EE0DBFFE1A@inba-mail02.sonusnet.com \
    --to=skarmarkar@sonusnet.com \
    --cc=dev@dpdk.org \
    /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).