* [PATCH 0/2] netvsc: small patches
@ 2018-08-06 18:22 Stephen Hemminger
2018-08-06 18:22 ` [PATCH 1/2] netvsc: support packet type Stephen Hemminger
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Stephen Hemminger @ 2018-08-06 18:22 UTC (permalink / raw)
To: dev; +Cc: Stephen Hemminger
A couple of small missing features discovered during later
testing. The netvsc PMD was not setting packet type or reporting
checksum failures.
Stephen Hemminger (2):
netvsc: support packet type
netvsc: report checksum failures
drivers/net/netvsc/hn_rxtx.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
--
2.18.0
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 1/2] netvsc: support packet type 2018-08-06 18:22 [PATCH 0/2] netvsc: small patches Stephen Hemminger @ 2018-08-06 18:22 ` Stephen Hemminger 2018-08-06 18:22 ` [PATCH 2/2] netvsc: report checksum failures Stephen Hemminger 2018-08-07 11:36 ` [PATCH 0/2] netvsc: small patches Thomas Monjalon 2 siblings, 0 replies; 4+ messages in thread From: Stephen Hemminger @ 2018-08-06 18:22 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Stephen Hemminger 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 <sthemmin@microsoft.com> --- 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 <rte_memory.h> #include <rte_eal.h> #include <rte_dev.h> +#include <rte_net.h> #include <rte_bus_vmbus.h> #include <rte_spinlock.h> @@ -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 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] netvsc: report checksum failures 2018-08-06 18:22 [PATCH 0/2] netvsc: small patches Stephen Hemminger 2018-08-06 18:22 ` [PATCH 1/2] netvsc: support packet type Stephen Hemminger @ 2018-08-06 18:22 ` Stephen Hemminger 2018-08-07 11:36 ` [PATCH 0/2] netvsc: small patches Thomas Monjalon 2 siblings, 0 replies; 4+ messages in thread From: Stephen Hemminger @ 2018-08-06 18:22 UTC (permalink / raw) To: dev; +Cc: Stephen Hemminger, Stephen Hemminger The host will notify netvsc device about failed UDP and TCP checksum. Propogate that information into the mbuf. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> --- drivers/net/netvsc/hn_rxtx.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c index 25c97ea43ad6..02ef27e363cc 100644 --- a/drivers/net/netvsc/hn_rxtx.c +++ b/drivers/net/netvsc/hn_rxtx.c @@ -513,6 +513,9 @@ static void hn_rxpkt(struct hn_rx_queue *rxq, struct hn_rx_bufinfo *rxb, if (info->csum_info & (NDIS_RXCSUM_INFO_UDPCS_OK | NDIS_RXCSUM_INFO_TCPCS_OK)) m->ol_flags |= PKT_RX_L4_CKSUM_GOOD; + else if (info->csum_info & (NDIS_RXCSUM_INFO_TCPCS_FAILED + | NDIS_RXCSUM_INFO_UDPCS_FAILED)) + m->ol_flags |= PKT_RX_L4_CKSUM_BAD; } if (info->hash_info != HN_NDIS_HASH_INFO_INVALID) { -- 2.18.0 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] netvsc: small patches 2018-08-06 18:22 [PATCH 0/2] netvsc: small patches Stephen Hemminger 2018-08-06 18:22 ` [PATCH 1/2] netvsc: support packet type Stephen Hemminger 2018-08-06 18:22 ` [PATCH 2/2] netvsc: report checksum failures Stephen Hemminger @ 2018-08-07 11:36 ` Thomas Monjalon 2 siblings, 0 replies; 4+ messages in thread From: Thomas Monjalon @ 2018-08-07 11:36 UTC (permalink / raw) To: Stephen Hemminger; +Cc: dev 06/08/2018 20:22, Stephen Hemminger: > A couple of small missing features discovered during later > testing. The netvsc PMD was not setting packet type or reporting > checksum failures. > > Stephen Hemminger (2): > netvsc: support packet type > netvsc: report checksum failures Applied, thanks ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-08-07 11:36 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-08-06 18:22 [PATCH 0/2] netvsc: small patches Stephen Hemminger 2018-08-06 18:22 ` [PATCH 1/2] netvsc: support packet type Stephen Hemminger 2018-08-06 18:22 ` [PATCH 2/2] netvsc: report checksum failures Stephen Hemminger 2018-08-07 11:36 ` [PATCH 0/2] netvsc: small patches Thomas Monjalon
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.