Wednesday, December 6, 2017

Linux: Why use MSI over the GIC mechanism (Brief)

MSIs are implemented as a write from the device rasising the interrupt to a special memory location which causes raising of the MSI.

Two main reasons to consider MSI over PICs:

1. Speed: Pin based PCI interrupts are usually shared across devices and hence we would typically need to invoke each associated interrupt handler. MSIs are not shared so this does not arise.
Another case is that PCI can only support single interrupt per function. In this case drivers have to explicitly check what event happened (e.g. tx done, rx etc for a single MAC interrupt in case of Wifi radios). Using MSI, there could be a dedicated interrupt for each type of event (from the MAC).


2. Consistency: In case of pin based interrupts, the interrupt may be raised before the complete data has arrived in memory. There are ways to work around this. However, in case of MSIs this is not a concern since MSI writes cannot pass data writes on the bus.

Reference:
Linux Kernel Documentation - https://www.kernel.org/doc/Documentation/PCI/MSI-HOWTO.txt

Wednesday, July 19, 2017

WiFi: PER based adaptive AMSDU aggregation worth the effort?

This has been a lingering question. A lot of studies (including one of ours) in the past has delved into the support for AMSDU aggregation - and the ability to consider PER as a factor for adaptively controlling AMSDU aggregation. But is it worth the computational effort? Can this be simplified by making AMSDU aggregation static and using other mechanisms for limiting PER?

Monday, June 19, 2017

WiFi: Load balancing through probe response control

Basic Idea:
Clients use probe requests as one of the first frames before connecting to an access point (AP). If the AP does not respond with a probe-response frame, the client will not proceed with the connection. We leverage this condition to control how clients are distributed across multiple access points in the network. This approach to client - balancing has the advantage that:
1. Load both RF and CPU are balanced across the APs.
2. No disconnect/connect is required for load balancing.
3. Leverages the fact that typical WLAN mobility is pseudo-static. So clients will not move significantly from the places where they connect. Even in case of mobility, the disruption is minimal.


Friday, May 26, 2017

Mixing MACs: An Introduction to Hybrid Radio Wireless Virtualization


Download Full PDF        |     ArXiv pub page

Abstract— This study presents the design of the hybrid wireless virtualization (HWV) controller based network architecture. Using a HWV controller, an unified approach can be taken for provisioning and management of virtualized heterogeneous radios, irrespective of their MAC and PHY layer mechanisms. It is shown that the airtime occupancy by transmissions from different slices or groups can be used as a single metric for tying these virtualized platforms. 

This paper discusses the architecture for doing a "network function virtualization" for wireless networks. An application for such virtualization of the radio architecture fits in directly with the neutral hosting concept being suggested in 5G wireless networks.

Sunday, May 21, 2017

WiFi: What are control response frames?

I have pasted some snippets from the standard which describe how rate control has to work for these special frames. This blog post is based on excerpts from section 9.7 of the 802.11 standard.

What are control response frames?
Following table shows all control frames, with the control response frames highlighted in bold:

Type description
Subtype value
Subtype description

01
Control
0000-0111
Reserved

01
Control
1000
Block Ack Request

01
Control
1001
Block Ack

01
Control
1010
PS-Poll

01
Control
1011
RTS

01
Control
1100
CTS

01
Control
1101
ACK

01
Control
1110
CF-end

01
Control
1111
CF-end + CF-ack

ACK or CTS or block-ack frames are referred to as control response frames by the WiFi standard. These are referred so because they are control frames sent in response to other frames.

How is rate selected for these frames?

Sunday, May 14, 2017

Dynamic Load Balancing for WiFi

With WLANs and WiFi architecture moving more towards software than a "burnt in the silicon" approach, it is possible to have different software components running at different points in the network. 

Consider for example the following functions that need to be done in the typical transmit lifecycle of a packet received on the ethernet interface that is supposed to go out on a WiFi interface:
  1. Ethernet receive handling
  2. Basic ethernet classification and fowarding
  3. Stripping of headers
  4. Attaching LLC headers
  5. Attaching WiFi headers
  6. Queening frames for transmission
  7. DMA'ing frames
  8. Scheduling frames for transmission
  9. Aggregation at different layers
  10. Encryption

Thursday, May 11, 2017

WINLAB Research: ORBIT Testbed & Related Work

This blog post is for archival of old research done at winlab.rutgers.edu
ORBIT testbed

This project involved among other things, integrating ORBIT services for facilitating remote experimentation, network virtualization to improve testbed utilization, and developing schemes for better topology mapping using software approaches. Previous efforts also included a prototype for allowing integrated experimentation between the Planetlab (wired) and ORBIT (wireless) experimentation consoles. Our work on the ORBIT testbed was also featured recently among 10 emerging technologies on the MIT Technology Review

Saturday, May 6, 2017

WiFi: AMSDU vs AMPDU: A Brief Tutorial on WiFi Aggregation Support

  • WiFi MAC architecture supports aggregation at two layers. 
  • The MAC service data  units (MSDUs) can be aggregated to form AMSDUs. 
  • Each AMSDU serves as a single MAC protocol data unit (MPDU). 
  • Another layer of aggregation is introduced when MPDUs can be packed together
WiFi Aggregation 

Tuesday, April 18, 2017

Wireless Channel Power Control

Our ideas for a hybrid approach for channel power control have been discussed here:
S. Ganu, G. Bhanage, P. Narasimhan, "System and Method for Computing Coverage Set and Resource Allocations in Wireless Networks", US Patent App. 13/563,500, 2014.

The key difference as noted in the application is that in some cases we propose using a combination of centralized and de-centralized channel power control i.e. the main channel allocation is done centrally and the local channel flips (based on radar etc) are done locally by the access point.

We propose doing a 2 phase channel allocation strategy:
1. Anchor channels: The baseline RF characteristics of a deployment rarely change i.e. the relative position of the infrastructure APs does not change, the other architecture of the building and basic coarse grained pathloss do not change over large time frames. We use this knowledge to come up with a coarse grained anchor channel assignment for each access point. This anchor channel will be a home channel based on the available

Download PDF
Download Citation info

Saturday, March 11, 2017

WINLAB Research: RollCall RFID - An active tag platform

The RollCall Project aims to build a cost effective asset tracking system by reducing power consumption, thus increasing battery life.
The design argues for the use of active tags for better monitoring of devices over longer distances, while operating them in a transmit only mode. Power lost in idle listening is conserved by eliminating the receiver entirely from the tags. More details on this project are available here.



Related publications:
  • RollCall : The Design For A Low Cost And Power Efficient Active RFID Asset Tracking System 
    Gautam Bhanage, Yu Zhang, Yanyong Zhang, Trappe Wade, and Rich Howard
    Proceedings of Eurocon 2007, 2007. [.pdf]

Tuesday, February 28, 2017

Linux: Difference between livelocks and deadlocks

Everyone knows what a deadlock [2] is!

Wait for graph as described on wikipedia
Defn Deadlock:
Two or more entities vying to get two or more locks in out of order. This leads to each entity waiting for the other entity to release the lock. Since no one releases their held lock the system is stuck and there is no easy recovery.

What is a livelock then?

Monday, February 20, 2017

What datastructure does the CFS use and why

CFS is the Linux kernels completely fair scheduler. It uses red black (RB) trees. 

Red Black trees - datastructure
Nice notes on understanding red-black trees are here [1] and [2].

Why and How is it used in the scheduler?

Wednesday, February 1, 2017

Code snippet to maintain moving averages

I want to maintain moving averages over a window without keeping individual elements in that window. A simple way to do it?

double approxRunningAverage (double avgres, double new_measurement) {

    avgres -= avgres / N;
    avgres += new_measurement / N;

    return avgres;
}

Sunday, January 29, 2017

To Pin or not to Pin on Symmetric Multiprocessor Systems


This is a nice interview questions as it helps to determine if the candidate is capable of discerning the tradeoffs in SMP system design. The question is pretty simple, consider a system where you have two cores 1 and 2 and two tasks e.g. timer tasks A and B. How would you design the scheduling in the system?


Citation information:
G. Bhanage, "To Pin or not to Pin on Symmetric Multiprocessor Systems", Tech Report GDB2017-003, bhanage.com, January 2017.

Bibtex:
@misc{bhanage2017pin,
  title={To Pin or not to Pin on Symmetric Multiprocessor Systems},
  author={Bhanage, Gautam},
  journal={http://www.bhanage.com/p/publications.html},
  number={Tech Report GDB2017-003},
  year={2017}
}

Saturday, January 21, 2017

Introduction to WiFi Packet Captures

If you are a beginner who is just starting to use WiFi with wireshark and want some sample captures to look at here are a few from the wireshark site:

Simple wireless join:
File: Network_Join_Nokia_Mobile.pcap Description: 802.11 capture of a new client joining the network, authenticating and activating WPA ciphering

File: wpa-Induction.pcap Description: 802.11 capture with WPA data encrypted using the password "Induction".

Monday, January 16, 2017

Takeaways and quotes from A brief history of time, a “timeless” classic by Stephen Hawking

Don't have time to read the entire book, then please feel free to browse through these few pages that I have put together. These are concepts, quotes and information on concepts collected  from across the web that are relevant to the information in this book.

 preview of brief history of time













Download and read: Review PDF

P.S> I am not a physicist so please take everything with a pinch of salt :)

Reference:
Quotes are mostly from goodreads.com
Concepts are snippets from wikipedia.com

Cite this:
G. Bhanage, "Takeaways and quotes from A brief history of  time, a “timeless” classic by Stephen Hawking", Published online at http://bhanage.com/  GDB2017-001, Jan, 2017