diff options
| author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-01-11 10:28:19 -0500 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-01-11 10:28:19 -0500 |
| commit | 734d1ece37fbf3d2ddfc71bc6c69e0fe35f02542 (patch) | |
| tree | c4805dd7e746b1feb9e09e9849f3245d0b2c0c6b /drivers/net/xen-netfront.c | |
| parent | 216c82c6aba63eeb49d7654b448e0d47bea255bb (diff) | |
| parent | 9931faca02c604c22335f5a935a501bb2ace6e20 (diff) | |
Merge tag 'v3.8-rc3' into v4l_for_linus
Linux 3.8-rc3
* tag 'v3.8-rc3': (11110 commits)
Linux 3.8-rc3
mm: reinstante dropped pmd_trans_splitting() check
cred: Remove tgcred pointer from struct cred
drm/ttm: fix fence locking in ttm_buffer_object_transfer
ARM: clps711x: Fix bad merge of clockevents setup
ARM: highbank: save and restore L2 cache and GIC on suspend
ARM: highbank: add a power request clear
ARM: highbank: fix secondary boot and hotplug
ARM: highbank: fix typos with hignbank in power request functions
ARM: dts: fix highbank cpu mpidr values
ARM: dts: add device_type prop to cpu nodes on Calxeda platforms
drm/prime: drop reference on imported dma-buf come from gem
xen/netfront: improve truesize tracking
ARM: mx5: Fix MX53 flexcan2 clock
ARM: OMAP2+: am33xx-hwmod: Fix wrongly terminated am33xx_usbss_mpu_irqs array
sctp: fix Kconfig bug in default cookie hmac selection
EDAC: Cleanup device deregistering path
EDAC: Fix EDAC Kconfig menu
EDAC: Fix kernel panic on module unloading
ALSA: hda - add mute LED for HP Pavilion 17 (Realtek codec)
...
Diffstat (limited to 'drivers/net/xen-netfront.c')
| -rw-r--r-- | drivers/net/xen-netfront.c | 37 |
1 files changed, 9 insertions, 28 deletions
diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index fc24eb9b3948..7ffa43bd7cf9 100644 --- a/drivers/net/xen-netfront.c +++ b/drivers/net/xen-netfront.c | |||
| @@ -1015,29 +1015,10 @@ err: | |||
| 1015 | i = xennet_fill_frags(np, skb, &tmpq); | 1015 | i = xennet_fill_frags(np, skb, &tmpq); |
| 1016 | 1016 | ||
| 1017 | /* | 1017 | /* |
| 1018 | * Truesize approximates the size of true data plus | 1018 | * Truesize is the actual allocation size, even if the |
| 1019 | * any supervisor overheads. Adding hypervisor | 1019 | * allocation is only partially used. |
| 1020 | * overheads has been shown to significantly reduce | 1020 | */ |
| 1021 | * achievable bandwidth with the default receive | 1021 | skb->truesize += PAGE_SIZE * skb_shinfo(skb)->nr_frags; |
| 1022 | * buffer size. It is therefore not wise to account | ||
| 1023 | * for it here. | ||
| 1024 | * | ||
| 1025 | * After alloc_skb(RX_COPY_THRESHOLD), truesize is set | ||
| 1026 | * to RX_COPY_THRESHOLD + the supervisor | ||
| 1027 | * overheads. Here, we add the size of the data pulled | ||
| 1028 | * in xennet_fill_frags(). | ||
| 1029 | * | ||
| 1030 | * We also adjust for any unused space in the main | ||
| 1031 | * data area by subtracting (RX_COPY_THRESHOLD - | ||
| 1032 | * len). This is especially important with drivers | ||
| 1033 | * which split incoming packets into header and data, | ||
| 1034 | * using only 66 bytes of the main data area (see the | ||
| 1035 | * e1000 driver for example.) On such systems, | ||
| 1036 | * without this last adjustement, our achievable | ||
| 1037 | * receive throughout using the standard receive | ||
| 1038 | * buffer size was cut by 25%(!!!). | ||
| 1039 | */ | ||
| 1040 | skb->truesize += skb->data_len - RX_COPY_THRESHOLD; | ||
| 1041 | skb->len += skb->data_len; | 1022 | skb->len += skb->data_len; |
| 1042 | 1023 | ||
| 1043 | if (rx->flags & XEN_NETRXF_csum_blank) | 1024 | if (rx->flags & XEN_NETRXF_csum_blank) |
| @@ -1311,7 +1292,7 @@ static const struct net_device_ops xennet_netdev_ops = { | |||
| 1311 | #endif | 1292 | #endif |
| 1312 | }; | 1293 | }; |
| 1313 | 1294 | ||
| 1314 | static struct net_device * __devinit xennet_create_dev(struct xenbus_device *dev) | 1295 | static struct net_device *xennet_create_dev(struct xenbus_device *dev) |
| 1315 | { | 1296 | { |
| 1316 | int i, err; | 1297 | int i, err; |
| 1317 | struct net_device *netdev; | 1298 | struct net_device *netdev; |
| @@ -1407,8 +1388,8 @@ static struct net_device * __devinit xennet_create_dev(struct xenbus_device *dev | |||
| 1407 | * structures and the ring buffers for communication with the backend, and | 1388 | * structures and the ring buffers for communication with the backend, and |
| 1408 | * inform the backend of the appropriate details for those. | 1389 | * inform the backend of the appropriate details for those. |
| 1409 | */ | 1390 | */ |
| 1410 | static int __devinit netfront_probe(struct xenbus_device *dev, | 1391 | static int netfront_probe(struct xenbus_device *dev, |
| 1411 | const struct xenbus_device_id *id) | 1392 | const struct xenbus_device_id *id) |
| 1412 | { | 1393 | { |
| 1413 | int err; | 1394 | int err; |
| 1414 | struct net_device *netdev; | 1395 | struct net_device *netdev; |
| @@ -1967,7 +1948,7 @@ static const struct xenbus_device_id netfront_ids[] = { | |||
| 1967 | }; | 1948 | }; |
| 1968 | 1949 | ||
| 1969 | 1950 | ||
| 1970 | static int __devexit xennet_remove(struct xenbus_device *dev) | 1951 | static int xennet_remove(struct xenbus_device *dev) |
| 1971 | { | 1952 | { |
| 1972 | struct netfront_info *info = dev_get_drvdata(&dev->dev); | 1953 | struct netfront_info *info = dev_get_drvdata(&dev->dev); |
| 1973 | 1954 | ||
| @@ -1990,7 +1971,7 @@ static int __devexit xennet_remove(struct xenbus_device *dev) | |||
| 1990 | 1971 | ||
| 1991 | static DEFINE_XENBUS_DRIVER(netfront, , | 1972 | static DEFINE_XENBUS_DRIVER(netfront, , |
| 1992 | .probe = netfront_probe, | 1973 | .probe = netfront_probe, |
| 1993 | .remove = __devexit_p(xennet_remove), | 1974 | .remove = xennet_remove, |
| 1994 | .resume = netfront_resume, | 1975 | .resume = netfront_resume, |
| 1995 | .otherend_changed = netback_changed, | 1976 | .otherend_changed = netback_changed, |
| 1996 | ); | 1977 | ); |
