PDF

Contract performance optimization

Want to summarize with AI?

Log in

Policy compression improves ternary content-addressable memory efficiency by compressing compatible bidirectional contract rules and combining their statistics.


Ternary content-addressable memory (TCAM) optimization, also called policy compression, stores compatible bidirectional contract rules more efficiently in hardware.

  • Is supported on second-generation Cisco Nexus 9000 Series top-of-rack switches with an -EX, -FX, -FX2, or later product ID suffix.

  • Requires the Enable Policy Compression directive on contract subjects.

  • Requires the reverse port option for filters that specify TCP or UDP ports.

Policy compression configuration and limitations

To optimize TCAM storage for contract rules, complete the following configuration:

  • Configure the contract to apply in both directions between the provider and consumer EPGs.

  • For filters that specify TCP or UDP ports, enable the reverse port option.

  • When you configure the contract subject, select Enable Policy Compression. This directive adds the no_stats option to the action attribute of the actrl:Rule managed object.

The following limitations apply to policy compression:

  • Per-rule statistics are not available. Combined hardware statistics for both directions remain available.

  • After you upgrade to Cisco APIC release 3.2(1), delete and reconfigure contract subjects that were created before the upgrade to enable policy compression.

  • Rules with a priority other than fully_qual are not compressed.

  • Opposite-direction rules are not compressed if properties such as action, including directives, prio, qos, or markDscp, are not identical.

  • Rules that use Implicit or implarp filters are not compressed.

  • Rules with the Deny, Redir, Copy, or Deny-log action are not compressed.

Table 1. Compression matrix

Reverse filter port enabled

TCP or UDP source port

TCP or UDP destination port

Compressed

Yes

Port A

Port B

Yes

Yes

Unspecified

Port B

Yes

Yes

Port A

Unspecified

Yes

Yes

Unspecified

Unspecified

Yes

No

Port A

Port B

No

No

Unspecified

Port B

No

No

Port A

Unspecified

No

No

Unspecified

Unspecified

Yes