From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-f194.google.com (mail-pf1-f194.google.com [209.85.210.194]) by dpdk.org (Postfix) with ESMTP id 75F6E1B398 for ; Mon, 6 Aug 2018 20:22:54 +0200 (CEST) Received: by mail-pf1-f194.google.com with SMTP id k21-v6so7241481pff.11 for ; Mon, 06 Aug 2018 11:22:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=l3Dspj3mt3A5cLBIY73IKvQYbRkoTrzhvFVROxHnA6E=; b=zTVdtOP0S2CtAmQW/71UI8sBukZrYDpZbnvfR4hraax/OKyiK/QLvbZzdft9lNehJI tyb5sj+5BrqPsgetnWf3wwkY5WT+NppMuDED/Hu8xBco2Ce5awi080Ji8KK6ovFY6/jS nezj3p8cMawYbkW+MVw09HpQKitihcpVgkuHX+fGl5ZnpO0dJEDCrABmJ+VYOUPPV0Mn dEktiauYHDS9N1m6rQpPxg/ZIeTg04K0mRRhK7WOXlpSd6LsTx8SFpIpGyeT2TK2Vins gQ5CnBuJPRAu5kskWEv1wZ53XlEcpasVBCLMuBe5POHROErMRFwtgbF6m9I/Ebiv+JJO aTxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=l3Dspj3mt3A5cLBIY73IKvQYbRkoTrzhvFVROxHnA6E=; b=EQJGDzCLMkxDN+wSrGHeM67/O303qF1ljf3UmmOobKHrxZDB+KU9NQe0AfXvFAnWnG ImPE6J+yr19LokI9l/R1UQj2rb+vbmwXzYVHUmmNp7/wij4MwrpZ6IHg17XinbvpPsap zVV0KjMAliZ2O1T5EiNIhGw3nh057w+kWPTCgkYbXydd2i3PBW2La9nPQNUqYT4SwBdF +eIcQm0OzOJ9nTg3WuIY8hTPISiZQjVJcKIMju1h+LCKALEhYlu4tQvs7Wx0rCNgXglm 8w2SjTLDOgVU7+Ps72Xl4Dr1t2iHb3Sg7axPAAZjdL6BlcjfS41TUoUyZygDOgtSfJkn kyBg== X-Gm-Message-State: AOUpUlGOFeKzMofKWpx4igaN/qHohYXwncuLWEgarNNMtrNXeiK6w+mR 3c9PPGS9IjgcJ3qZntdxHPL+nXbY56s= X-Google-Smtp-Source: AAOMgpdRq3R4DaL9enyZZa4q4y0sj6eztjoABlRIW6RlYJwXHczFmvkJLu74X3UgEDLWT8S0TbJ7fg== X-Received: by 2002:a63:8b44:: with SMTP id j65-v6mr15638717pge.248.1533579773318; Mon, 06 Aug 2018 11:22:53 -0700 (PDT) Received: from xeon-e3.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id b20-v6sm26683086pfc.178.2018.08.06.11.22.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Aug 2018 11:22:51 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Stephen Hemminger Date: Mon, 6 Aug 2018 11:22:43 -0700 Message-Id: <20180806182244.9842-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180806182244.9842-1-stephen@networkplumber.org> References: <20180806182244.9842-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH 1/2] netvsc: support packet type X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Aug 2018 18:22:54 -0000 The Netvsc PMD was not filling in the packet type information. Fixes: 4e9c73e96e83 ("net/netvsc: add Hyper-V network device") Signed-off-by: Stephen Hemminger --- drivers/net/netvsc/hn_rxtx.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c index cc8a534b5ce8..25c97ea43ad6 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -495,6 +496,10 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb, m->port = rxq->port_id; m->pkt_len = dlen; m->data_len = dlen; + m->packet_type = rte_net_get_ptype(m, NULL, + RTE_PTYPE_L2_MASK | + RTE_PTYPE_L3_MASK | + RTE_PTYPE_L4_MASK); if (info->vlan_info != HN_NDIS_VLAN_INFO_INVALID) { m->vlan_tci = info->vlan_info; @@ -515,9 +520,10 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb, m->hash.rss = info->hash_value; } - PMD_RX_LOG(DEBUG, "port %u:%u RX id %" PRIu64 " size %u ol_flags %#" PRIx64, + PMD_RX_LOG(DEBUG, + "port %u:%u RX id %"PRIu64" size %u type %#x ol_flags %#"PRIx64, rxq->port_id, rxq->queue_id, rxb->xactid, - m->pkt_len, m->ol_flags); + m->pkt_len, m->packet_type, m->ol_flags); ++rxq->stats.packets; rxq->stats.bytes += m->pkt_len; -- 2.18.0