* sum(delta(snd_una)), or how many bytes
                                 * were acked.
                                 */
+       u32     dsack_dups;     /* RFC4898 tcpEStatsStackDSACKDups
+                                * total number of DSACK blocks received
+                                */
        u32     snd_una;        /* First byte we want an ack for        */
        u32     snd_sml;        /* Last byte of the most recently transmitted small packet */
        u32     rcv_tstamp;     /* timestamp of last received ACK (for keepalives) */
 
 
        __u64   tcpi_bytes_sent;     /* RFC4898 tcpEStatsPerfHCDataOctetsOut */
        __u64   tcpi_bytes_retrans;  /* RFC4898 tcpEStatsPerfOctetsRetrans */
+       __u32   tcpi_dsack_dups;     /* RFC4898 tcpEStatsStackDSACKDups */
 };
 
 /* netlink attributes types for SCM_TIMESTAMPING_OPT_STATS */
        TCP_NLA_DELIVERED_CE,   /* Like above but only ones w/ CE marks */
        TCP_NLA_BYTES_SENT,     /* Data bytes sent including retransmission */
        TCP_NLA_BYTES_RETRANS,  /* Data bytes retransmitted */
+       TCP_NLA_DSACK_DUPS,     /* DSACK blocks received */
 };
 
 /* for TCP_MD5SIG socket option */
 
        tp->compressed_ack = 0;
        tp->bytes_sent = 0;
        tp->bytes_retrans = 0;
+       tp->dsack_dups = 0;
 
        /* Clean up fastopen related fields */
        tcp_free_fastopen_req(tp);
        info->tcpi_delivered_ce = tp->delivered_ce;
        info->tcpi_bytes_sent = tp->bytes_sent;
        info->tcpi_bytes_retrans = tp->bytes_retrans;
+       info->tcpi_dsack_dups = tp->dsack_dups;
        unlock_sock_fast(sk, slow);
 }
 EXPORT_SYMBOL_GPL(tcp_get_info);
                nla_total_size(sizeof(u32)) + /* TCP_NLA_DELIVERED_CE */
                nla_total_size_64bit(sizeof(u64)) + /* TCP_NLA_BYTES_SENT */
                nla_total_size_64bit(sizeof(u64)) + /* TCP_NLA_BYTES_RETRANS */
+               nla_total_size(sizeof(u32)) + /* TCP_NLA_DSACK_DUPS */
                0;
 }
 
                          TCP_NLA_PAD);
        nla_put_u64_64bit(stats, TCP_NLA_BYTES_RETRANS, tp->bytes_retrans,
                          TCP_NLA_PAD);
+       nla_put_u32(stats, TCP_NLA_DSACK_DUPS, tp->dsack_dups);
 
        return stats;
 }
 
 {
        tp->rx_opt.sack_ok |= TCP_DSACK_SEEN;
        tp->rack.dsack_seen = 1;
+       tp->dsack_dups++;
 }
 
 /* It's reordering when higher sequence was delivered (i.e. sacked) before