Required tools for playing around with memory:
hexdumpobjdumpreadelfxxdgcore
| /* | |
| * This program is free software: you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation, either version 3 of the License, or | |
| * (at your option) any later version. | |
| */ | |
| #include <arpa/inet.h> | |
| #include <linux/if_packet.h> | |
| #include <stdio.h> |
| --- a/drivers/net/hyperv/netvsc.c 2018-06-21 06:21:38.510273512 +0000 | |
| +++ b/drivers/net/hyperv/netvsc.c 2018-06-21 06:33:29.991826355 +0000 | |
| @@ -1251,9 +1251,10 @@ | |
| if (send_recv_completions(ndev, net_device, nvchan) == 0 && | |
| work_done < budget && | |
| netvsc_napi_complete_done(napi, work_done) && | |
| - hv_end_read(&channel->inbound)) { | |
| + hv_end_read(&channel->inbound) && | |
| + napi_schedule_prep(napi)) { | |
| hv_begin_read(&channel->inbound); |
| diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c | |
| index 64713ff..e51b080 100644 | |
| --- a/drivers/hv/vmbus_drv.c | |
| +++ b/drivers/hv/vmbus_drv.c | |
| @@ -476,6 +476,68 @@ static ssize_t channel_vp_mapping_show(struct device *dev, | |
| } | |
| static DEVICE_ATTR_RO(channel_vp_mapping); | |
| +static ssize_t channel_rb_show(struct device *dev, | |
| + struct device_attribute *dev_attr, |
| #!/usr/bin/env python | |
| #-*- coding: utf-8 -*- | |
| # Test data including the secret key, ip, port numbers and the hash values | |
| # as the result is from "Intel Ethernet Controller 710 Series Datasheet". | |
| KEY=[] | |
| def reset_key(): | |
| global KEY |
| # deb cdrom:[Ubuntu 19.10 _Eoan Ermine_ - Release amd64 (20191017)]/ eoan main restricted | |
| # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
| # newer versions of the distribution. | |
| deb http://id.archive.ubuntu.com/ubuntu/ eoan main restricted | |
| # deb-src http://id.archive.ubuntu.com/ubuntu/ eoan main restricted | |
| ## Major bug fix updates produced after the final release of the | |
| ## distribution. | |
| deb http://id.archive.ubuntu.com/ubuntu/ eoan-updates main restricted |
| /** | |
| * Hello, and welcome to this brief, but hopefully complete, example file for | |
| * wireless packet injection using pcap. | |
| * | |
| * Although there are various resources for this spread on the web, it is hard | |
| * to find a single, cohesive piece that shows how everything fits together. | |
| * This file aims to give such an example, constructing a fully valid UDP packet | |
| * all the way from the 802.11 PHY header (through radiotap) to the data part of | |
| * the packet and then injecting it on a wireless interface | |
| * |
| /* | |
| * IP checksumming functions. | |
| * (c) 2008 Gerd Hoffmann <[email protected]> | |
| * | |
| * This program is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU General Public License as published by | |
| * the Free Software Foundation; under version 2 of the License. | |
| * | |
| * This program is distributed in the hope that it will be useful, | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| yum --enablerepo=base-debuginfo install -y kernel-debuginfo-$(uname -r) |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |