From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-it0-f53.google.com (mail-it0-f53.google.com [209.85.214.53]) by dpdk.org (Postfix) with ESMTP id DC4536A71 for ; Fri, 7 Apr 2017 19:45:05 +0200 (CEST) Received: by mail-it0-f53.google.com with SMTP id y18so46689414itc.1 for ; Fri, 07 Apr 2017 10:45:05 -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=yg3DsuS7M/xjmIXPZfjjh8NMLUFuVq06krcHFuzSfrQ=; b=B6uYay/MmlLRT4Pc1OI9uGDBRjYxwhztyLDPImY9Z6TQvXDX1HT7+DKMtdgpbrFngT ozSRvBWqP/T0dDmYPK8JXwN3Nps7ZXgExH1qTSgl7cszLjKn93MLddjXEatK0z8vA0fm ljXZVSPoDdZ/7n7eBcjRekUzdznSlxb4nwykEjzuTFJY7ItYBhQKSDsrWVPMJaMAjMEL 0i5BzsoQ2ON4m/j+DLhWDtali8cgp132homq84hnsfZF7HIiBxfpzmABpZ3sdpVsnIl9 wcSNYw891Bgv5A21BCStHgk3F755dpnR3KX3luIvsXniexJjgr2DEmYBwz+k67s4V/75 +9lA== 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=yg3DsuS7M/xjmIXPZfjjh8NMLUFuVq06krcHFuzSfrQ=; b=VsbjnqvSG9zExUjj+KP+aWhvqLl37e4Ti/hRTfLmcZoIzfa0opuPRUeUoE16jN+4Wx AcnzcWC3TpM5wrGxmKFOMRTgPOVp4g7n1KjZdNC2DalSOI9tVwUOCqh0xLbgON3tQryD 9sIRHSocxNmeZbyy8CCxVLiZMe8fH6Eiloiuc/tG8xXgJ4MOaKRdnN8D3/2ZsljO/QCq 7XcvBIARrXSkr8Z/FFLuAUwNoxJU4dOZvb3uPksns7L9LI9YV6VMM9BQq7nZ2c9ZzA7k jnbCVJHKJPo46KTW5dZKNMxHOCWLa1utV6Q3O776XgUGmvrZ22uSWiD9SqErOvVLO6pE EIPA== X-Gm-Message-State: AN3rC/7HWqNmEC9Y3uIG6QncGftDuBVIroiiZ3d5usm8tS+rDT67vZ7R Shbg2VrOV1l4BA== X-Received: by 10.36.43.213 with SMTP id h204mr608661ita.113.1491587105265; Fri, 07 Apr 2017 10:45:05 -0700 (PDT) Received: from plumbers-lap.home.lan ([66.171.166.114]) by smtp.gmail.com with ESMTPSA id s40sm4649675ite.18.2017.04.07.10.45.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 07 Apr 2017 10:45:04 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger Date: Fri, 7 Apr 2017 13:44:49 -0400 Message-Id: <20170407174457.4180-4-stephen@networkplumber.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170407174457.4180-1-stephen@networkplumber.org> References: <20170407174457.4180-1-stephen@networkplumber.org> Subject: [dpdk-dev] [PATCH 03/11] vhost: remove unnecessary cast of void pointer 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: Fri, 07 Apr 2017 17:45:06 -0000 Remove unnecessary casts of void * pointers to a specfic type. Signed-off-by: Stephen Hemminger --- lib/librte_vhost/virtio_net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index d6b7c7a22..b9f216842 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c @@ -629,14 +629,14 @@ parse_ethernet(struct rte_mbuf *m, uint16_t *l4_proto, void **l4_hdr) switch (ethertype) { case ETHER_TYPE_IPv4: - ipv4_hdr = (struct ipv4_hdr *)l3_hdr; + ipv4_hdr = l3_hdr; *l4_proto = ipv4_hdr->next_proto_id; m->l3_len = (ipv4_hdr->version_ihl & 0x0f) * 4; *l4_hdr = (char *)l3_hdr + m->l3_len; m->ol_flags |= PKT_TX_IPV4; break; case ETHER_TYPE_IPv6: - ipv6_hdr = (struct ipv6_hdr *)l3_hdr; + ipv6_hdr = l3_hdr; *l4_proto = ipv6_hdr->proto; m->l3_len = sizeof(struct ipv6_hdr); *l4_hdr = (char *)l3_hdr + m->l3_len; @@ -686,7 +686,7 @@ vhost_dequeue_offload(struct virtio_net_hdr *hdr, struct rte_mbuf *m) switch (hdr->gso_type & ~VIRTIO_NET_HDR_GSO_ECN) { case VIRTIO_NET_HDR_GSO_TCPV4: case VIRTIO_NET_HDR_GSO_TCPV6: - tcp_hdr = (struct tcp_hdr *)l4_hdr; + tcp_hdr = l4_hdr; m->ol_flags |= PKT_TX_TCP_SEG; m->tso_segsz = hdr->gso_size; m->l4_len = (tcp_hdr->data_off & 0xf0) >> 2; -- 2.11.0