DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: [dpdk-dev] Bug in outgoing packet with vmxnet3 with VLAN tagging
@ 2014-10-10 20:01 Karmarkar Suyash
  0 siblings, 0 replies; 2+ messages in thread
From: Karmarkar Suyash @ 2014-10-10 20:01 UTC (permalink / raw)
  To: dev

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dpdk-dev] Bug in outgoing packet with vmxnet3 with VLAN tagging
@ 2014-10-10 12:46 Karmarkar Suyash
  0 siblings, 0 replies; 2+ messages in thread
From: Karmarkar Suyash @ 2014-10-10 12:46 UTC (permalink / raw)
  To: dev

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-10-10 19:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-10 20:01 [dpdk-dev] Bug in outgoing packet with vmxnet3 with VLAN tagging Karmarkar Suyash
  -- strict thread matches above, loose matches on Subject: below --
2014-10-10 12:46 Karmarkar Suyash

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git