Print this page
5045 use atomic_{inc,dec}_* instead of atomic_add_*

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/inet/ip/ip_output.c
          +++ new/usr/src/uts/common/inet/ip/ip_output.c
↓ open down ↓ 1550 lines elided ↑ open up ↑
1551 1551  ire_send_noroute_v4(ire_t *ire, mblk_t *mp, void *iph_arg,
1552 1552      ip_xmit_attr_t *ixa, uint32_t *identp)
1553 1553  {
1554 1554          ip_stack_t      *ipst = ixa->ixa_ipst;
1555 1555          ipha_t          *ipha = (ipha_t *)iph_arg;
1556 1556          ill_t           *ill;
1557 1557          ip_recv_attr_t  iras;
1558 1558          boolean_t       dummy;
1559 1559  
1560 1560          /* We assign an IP ident for nice errors */
1561      -        ipha->ipha_ident = atomic_add_32_nv(identp, 1);
     1561 +        ipha->ipha_ident = atomic_inc_32_nv(identp);
1562 1562  
1563 1563          BUMP_MIB(&ipst->ips_ip_mib, ipIfStatsOutNoRoutes);
1564 1564  
1565 1565          if (ire->ire_type & IRE_NOROUTE) {
1566 1566                  /* A lack of a route as opposed to RTF_REJECT|BLACKHOLE */
1567 1567                  ip_rts_change(RTM_MISS, ipha->ipha_dst, 0, 0, 0, 0, 0, 0,
1568 1568                      RTA_DST, ipst);
1569 1569          }
1570 1570  
1571 1571          if (ire->ire_flags & RTF_BLACKHOLE) {
↓ open down ↓ 993 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX