diff mbox

[dpdk-dev,v2,07/15] vmxnet3: support of unified packet type

Message ID 1423464049-13457-8-git-send-email-helin.zhang@intel.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Helin Zhang Feb. 9, 2015, 6:40 a.m. UTC
To unify packet types among all PMDs, bit masks of packet type for
ol_flags are replaced by unified packet type.

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
---
 lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

v2 changes:
* Used redefined packet types and enlarged packet_type field in mbuf.

Comments

Yong Wang Feb. 11, 2015, 1:46 a.m. UTC | #1
On 2/8/15, 10:40 PM, "Helin Zhang" <helin.zhang@intel.com> wrote:

>To unify packet types among all PMDs, bit masks of packet type for
>ol_flags are replaced by unified packet type.
>
>Signed-off-by: Helin Zhang <helin.zhang@intel.com>
>---

Acked-by: Yong Wang <yongwang@vmware.com>


> lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
>v2 changes:
>* Used redefined packet types and enlarged packet_type field in mbuf.
>
>diff --git a/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c
>b/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c
>index 8425f32..c85ebd8 100644
>--- a/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c
>+++ b/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c
>@@ -650,9 +650,9 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf
>**rx_pkts, uint16_t nb_pkts)
> 			struct ipv4_hdr *ip = (struct ipv4_hdr *)(eth + 1);
> 
> 			if (((ip->version_ihl & 0xf) << 2) > (int)sizeof(struct ipv4_hdr))
>-				rxm->ol_flags |= PKT_RX_IPV4_HDR_EXT;
>+				rxm->packet_type = RTE_PTYPE_L3_IPV4_EXT;
> 			else
>-				rxm->ol_flags |= PKT_RX_IPV4_HDR;
>+				rxm->packet_type = RTE_PTYPE_L3_IPV4;
> 
> 			if (!rcd->cnc) {
> 				if (!rcd->ipc)
>-- 
>1.9.3
>
diff mbox

Patch

diff --git a/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c b/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c
index 8425f32..c85ebd8 100644
--- a/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c
+++ b/lib/librte_pmd_vmxnet3/vmxnet3_rxtx.c
@@ -650,9 +650,9 @@  vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 			struct ipv4_hdr *ip = (struct ipv4_hdr *)(eth + 1);
 
 			if (((ip->version_ihl & 0xf) << 2) > (int)sizeof(struct ipv4_hdr))
-				rxm->ol_flags |= PKT_RX_IPV4_HDR_EXT;
+				rxm->packet_type = RTE_PTYPE_L3_IPV4_EXT;
 			else
-				rxm->ol_flags |= PKT_RX_IPV4_HDR;
+				rxm->packet_type = RTE_PTYPE_L3_IPV4;
 
 			if (!rcd->cnc) {
 				if (!rcd->ipc)