Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Once a server's resources are properly discovered by the server device driver, periodic CPU and NIC monitoring of these resources takes place.

The CPU and NIC monitoring command issued by the device driver hits the following resource path on the server:

HTTP GET: http://serverIp/metron/stats

A server with 2 Intel CPU cores and 1 Mellanox 100 GbE NIC might provide the following responce:

{
    "busyCpus":0,
    "freeCpus":2,
    "cpus":
    [
        {
            "id":0,
            "load":0,
            "busy":false
        },
        {
            "id":1,
            "load":0,
            "busy":false
        }
    ],
    "nics":
    [
        {
            "name":"fd0",
            "index":0,
            "rxCount":"0",
            "rxBytes":"0",
            "rxDropped":"0",
            "rxErrors":"0",
            "txCount":"0",
            "txBytes":"0",
            "txErrors":"0"
        }
    ]
}

NIC Rule Monitoring

The server device driver also performs periodic NIC rule monitoring.

The NIC rule monitoring command issued by the device driver hits the following resource path on the server:

HTTP GET: http://serverIp/metron/rules

A server with 1 NIC rule in NIC with name fd0 (associated with CPU core 0) might respond as follows:

{
"rules":
[
{
"id":"5057dd63-93ea-42ca-bb14-8a5e37e214da",
"rxFilter":{
"method":"flow"
},
"nics":
[
{
"nicName":"fd0",
"cpus":
[
{
"cpuId":0,
"cpuRules":
[
{
"ruleId": 54324671113440126,
"ruleContent":"ingress pattern eth type is 2048 / ipv4 src is 192.168.100.7 dst is 192.168.1.7 / udp src is 53 / end actions queue index 0 / end"
}
]
}
]
}
]
}
]

}

Note that the ruleContent field contains a rule that follows the DPDK Flow API, as the NIC on this server is bound to a DPDK driver.

The example rule matches packets with source IP address 192.168.100.7, destination IP address 192.168.1.7, and source UDP port 53. The action of this rule redirects the matched packets to hardware queue with index 0.

This queue is associated with CPU core 0, as indicated by the cpuId field.


A complete implementation of the data plane side of a server device can be found here.

...