Patent ID: 7653801

Claim:
A computer program product stored in a computer readable medium for managing per-virtual port performance metrics in a logically partitioned data processing system, the computer program product comprising: instructions for receiving a request to perform a management operation for a particular virtual port; instructions for determining by a physical adapter whether the management operation is a read of metrics for the particular virtual port; instructions for determining by the physical adapter whether the management operation is an initialize operation of the metrics for the particular virtual port in response to determining that the management operation is not a read; instructions for determining whether the particular virtual port is an upstream port or a downstream port in response to determining that the management operation is an initialize operation: instructions for allocating by the physical adapter an upstream virtual port table for the particular virtual port in response to determining that the particular virtual port is an upstream port; instructions for allocating by the physical adapter a downstream virtual port table for the particular virtual port in response to determining that the particular virtual port is a downstream port; instructions for assigning the allocated virtual port table to the particular virtual port; instructions for resetting the metrics for the particular virtual port to zero in the virtual port table that was allocated for the particular virtual port; and instructions for transferring completion results to a host through a direct memory access operation; instructions for determining whether the management operation is a destroy operation in response to determining that the management operation is not an initialize operation; instructions for destroying the virtual port table for the particular virtual port in response to determining that the management operation is a destroy operation; and instructions for resetting the metrics for the particular virtual port to zero in the virtual port table that was allocated for the particular virtual port in response to determining that the management operation is not a destroy operation.