Patent ID: 7308551

Claim:
A method of managing per-virtual port performance metrics in a logically partitioned data processing system, the method comprising the computer implemented steps of: allocating a subset of resources of a physical adapter to a virtual adapter of a plurality of virtual adapters, wherein the subset includes a virtual port having an identifier assigned thereto; associating the identifier of the virtual port with an address of a physical port; associating a metric table with the virtual port, wherein the metric table includes metrics of operations that target the virtual port; allocating a respective subset to each of the plurality of virtual adapters, wherein each subset includes a respective virtual port having an identifier assigned thereto; wherein associating a metric table further includes: associating a respective metric table to each virtual port of each of the plurality of virtual adapters; in response to a request to perform a management operation for a particular virtual port: determining, by the physical adapter, if the management operation is a read of the particular virtual port's metrics; if the management operation is a read: reading, by the physical adapter, the particular virtual port's metric table; transferring the particular virtual port's metrics and management operation completion results through a direct memory (DMA) operation to the host; if the management operation is not a read, determining, by the physical adapter, if the management operation is an initialize operation of metrics for the particular virtual port; if the management operation is an initialize operation, determining if the particular virtual port is an upstream port or a downstream port: allocating, by the physical adapter, an upstream virtual port table for the particular virtual port if the particular virtual port is an upstream port; allocating, by the physical adapter, a downstream virtual port table for the particular virtual port if the particular virtual port is an downstream port; assigning the allocated virtual port table to the particular virtual port; resetting the particular virtual port's metrics to zero in the virtual port table that was allocated for the particular virtual port; and transferring completion results to the host through a DMA PCI operation; if the management operation is not an initialize operation, determining if the management operation is a destroy operation; if the management operation is a destroy operation, destroying the particular virtual port's metric table; and if the management operation is not a destroy operation, resetting the particular virtual port's metrics to zero.