summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongseok Koh <yskoh@mellanox.com>2017-07-26 12:29:32 -0700
committerYuanhan Liu <yliu@fridaylinux.org>2017-08-29 14:55:38 +0800
commit40dc666e665cf70869e2b6847db63285eca35508 (patch)
tree3daf8467a7415795a4982e8af112c9673dc260bd
parent768df9ad9fb4e1cc31c01909cb02134754cff1a5 (diff)
downloaddpdk-stable-40dc666e665cf70869e2b6847db63285eca35508.zip
dpdk-stable-40dc666e665cf70869e2b6847db63285eca35508.tar.gz
dpdk-stable-40dc666e665cf70869e2b6847db63285eca35508.tar.xz
net/mlx5: fix missing packet type calculation
[ upstream commit 48dfc20f1e456a69ec3f7c7a06319107d0f78e8e ] Calculation of packet type is currently enabled only when HW checksum is enabled. This isn't related to HW checksum offload. Enable it regardless. Fixes: 081f7eae242e ("mlx5: process offload flags only when requested") Signed-off-by: Yongseok Koh <yskoh@mellanox.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
-rw-r--r--drivers/net/mlx5/mlx5_rxtx.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/mlx5/mlx5_rxtx.c b/drivers/net/mlx5/mlx5_rxtx.c
index db5a8ee..c416009 100644
--- a/drivers/net/mlx5/mlx5_rxtx.c
+++ b/drivers/net/mlx5/mlx5_rxtx.c
@@ -2020,7 +2020,7 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
pkt = seg;
assert(len >= (rxq->crc_present << 2));
/* Update packet information. */
- pkt->packet_type = 0;
+ pkt->packet_type = rxq_cq_to_pkt_type(cqe);
pkt->ol_flags = 0;
if (rss_hash_res && rxq->rss_hash) {
pkt->hash.rss = rss_hash_res;
@@ -2038,10 +2038,8 @@ mlx5_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n)
mlx5_flow_mark_get(mark);
}
}
- if (rxq->csum | rxq->csum_l2tun) {
- pkt->packet_type = rxq_cq_to_pkt_type(cqe);
+ if (rxq->csum | rxq->csum_l2tun)
pkt->ol_flags |= rxq_cq_to_ol_flags(rxq, cqe);
- }
if (rxq->vlan_strip &&
(cqe->hdr_type_etc &
htons(MLX5_CQE_VLAN_STRIPPED))) {