Skip to content

Instantly share code, notes, and snippets.

@dcui
dcui / channel_rb_show.patch
Last active June 21, 2018 07:12
channel_rb_show.patch
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,
@dcui
dcui / fix_netvsc_poll.patch
Last active June 21, 2018 07:03
fix_netvsc_poll.patch
--- 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);
@dcui
dcui / memory_layout.md
Created May 10, 2017 12:11 — forked from CMCDragonkai/memory_layout.md
Linux: Understanding the Memory Layout of Linux Executables

Understanding the Memory Layout of Linux Executables

Required tools for playing around with memory:

  • hexdump
  • objdump
  • readelf
  • xxd
  • gcore
@dcui
dcui / sendRawEth.c
Created May 20, 2016 10:06 — forked from austinmarton/sendRawEth.c
Send a raw Ethernet frame in Linux
/*
* 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>