Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Aug 2016 03:55:43 +0000 (UTC)
From:      Sepherosa Ziehau <sephe@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r305048 - head/sys/dev/hyperv/netvsc
Message-ID:  <201608300355.u7U3th4a067760@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sephe
Date: Tue Aug 30 03:55:43 2016
New Revision: 305048
URL: https://svnweb.freebsd.org/changeset/base/305048

Log:
  hyperv/hn: Remove unused function
  
  MFC after:	1 week
  Sponsored by:	Microsoft
  Differential Revision:	https://reviews.freebsd.org/D7684

Modified:
  head/sys/dev/hyperv/netvsc/hv_rndis_filter.c

Modified: head/sys/dev/hyperv/netvsc/hv_rndis_filter.c
==============================================================================
--- head/sys/dev/hyperv/netvsc/hv_rndis_filter.c	Tue Aug 30 03:40:22 2016	(r305047)
+++ head/sys/dev/hyperv/netvsc/hv_rndis_filter.c	Tue Aug 30 03:55:43 2016	(r305048)
@@ -82,9 +82,6 @@ static void hv_rf_receive_data(struct hn
 static inline int hv_rf_query_device_mac(rndis_device *device);
 static inline int hv_rf_query_device_link_status(rndis_device *device);
 static int  hv_rf_init_device(rndis_device *device);
-int
-hv_rf_send_offload_request(struct hn_softc *sc,
-    rndis_offload_params *offloads);
 
 static void hn_rndis_sent_halt(struct hn_send_ctx *sndc,
     struct hn_softc *sc, struct vmbus_channel *chan,
@@ -352,78 +349,6 @@ hv_rf_receive_response(rndis_device *dev
 	}
 }
 
-int
-hv_rf_send_offload_request(struct hn_softc *sc,
-    rndis_offload_params *offloads)
-{
-	rndis_request *request;
-	rndis_set_request *set;
-	rndis_offload_params *offload_req;
-	rndis_set_complete *set_complete;	
-	rndis_device *rndis_dev = sc->rndis_dev;
-	device_t dev = sc->hn_dev;
-	uint32_t extlen = sizeof(rndis_offload_params);
-	int ret;
-
-	if (sc->hn_nvs_ver <= NVSP_PROTOCOL_VERSION_4) {
-		extlen = VERSION_4_OFFLOAD_SIZE;
-		/* On NVSP_PROTOCOL_VERSION_4 and below, we do not support
-		 * UDP checksum offload.
-		 */
-		offloads->udp_ipv4_csum = 0;
-		offloads->udp_ipv6_csum = 0;
-	}
-
-	request = hv_rndis_request(rndis_dev, REMOTE_NDIS_SET_MSG,
-	    RNDIS_MESSAGE_SIZE(rndis_set_request) + extlen);
-	if (!request)
-		return (ENOMEM);
-
-	set = &request->request_msg.msg.set_request;
-	set->oid = RNDIS_OID_TCP_OFFLOAD_PARAMETERS;
-	set->info_buffer_length = extlen;
-	set->info_buffer_offset = sizeof(rndis_set_request);
-	set->device_vc_handle = 0;
-
-	offload_req = (rndis_offload_params *)((unsigned long)set +
-	    set->info_buffer_offset);
-	*offload_req = *offloads;
-	offload_req->header.type = RNDIS_OBJECT_TYPE_DEFAULT;
-	offload_req->header.revision = RNDIS_OFFLOAD_PARAMETERS_REVISION_3;
-	offload_req->header.size = extlen;
-
-	ret = hv_rf_send_request(rndis_dev, request, REMOTE_NDIS_SET_MSG);
-	if (ret != 0) {
-		device_printf(dev, "hv send offload request failed, ret=%d!\n",
-		    ret);
-		goto cleanup;
-	}
-
-	ret = sema_timedwait(&request->wait_sema, 5 * hz);
-	if (ret != 0) {
-		device_printf(dev, "hv send offload request timeout\n");
-		goto cleanup;
-	}
-
-	set_complete = &request->response_msg.msg.set_complete;
-	if (set_complete->status == RNDIS_STATUS_SUCCESS) {
-		device_printf(dev, "hv send offload request succeeded\n");
-		ret = 0;
-	} else {
-		if (set_complete->status == RNDIS_STATUS_NOT_SUPPORTED) {
-			device_printf(dev, "HV Not support offload\n");
-			ret = 0;
-		} else {
-			ret = set_complete->status;
-		}
-	}
-
-cleanup:
-	hv_put_rndis_request(rndis_dev, request);
-
-	return (ret);
-}
-
 /*
  * RNDIS filter receive indicate status
  */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201608300355.u7U3th4a067760>