Mercurial > illumos > illumos-gate
changeset 4911:13f2ed4acf3c
6557970 Data from OBP is double copied in vsw driver
author | rf157361 |
---|---|
date | Mon, 20 Aug 2007 16:05:45 -0700 |
parents | c0fdaa83ffd4 |
children | 68b561701650 |
files | usr/src/uts/sun4v/io/vsw.c |
diffstat | 1 files changed, 2 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/sun4v/io/vsw.c Mon Aug 20 15:48:19 2007 -0700 +++ b/usr/src/uts/sun4v/io/vsw.c Mon Aug 20 16:05:45 2007 -0700 @@ -6263,7 +6263,6 @@ vsw_private_desc_t *priv_addr = NULL; vsw_t *vswp = ldcp->ldc_vswp; mblk_t *mp = NULL; - mblk_t *nmp; size_t nbytes = 0; size_t off = 0; uint64_t idx = 0; @@ -6327,25 +6326,8 @@ D2(vswp, "%s(%d): copied in %ld bytes using %d cookies", __func__, ldcp->ldc_id, nbytes, ncookies); - /* - * Upper layer is expecting the IP header in the packet to - * be 4-bytes aligned, but the OBP is sending packets that - * are not aligned. So, copy the data to another message - * such that the alignment requirement is met. - */ - nmp = allocb(datalen + VNET_IPALIGN, BPRI_MED); - if (nmp == NULL) { - DERR(vswp, "%s(%lld): allocb failed", - __func__, ldcp->ldc_id); - freemsg(mp); - return; - } - nmp->b_rptr += VNET_IPALIGN; - bcopy(mp->b_rptr, nmp->b_rptr, datalen); - freemsg(mp); - /* point to the actual end of data */ - nmp->b_wptr = nmp->b_rptr + datalen; + mp->b_wptr = mp->b_rptr + datalen; /* * We ACK back every in-band descriptor message we process @@ -6356,7 +6338,7 @@ sizeof (vnet_ibnd_desc_t), B_TRUE); /* send the packet to be switched */ - vswp->vsw_switch_frame(vswp, nmp, VSW_VNETPORT, + vswp->vsw_switch_frame(vswp, mp, VSW_VNETPORT, ldcp->ldc_port, NULL); break;