ethdev: support SCTP Rx checksum offload
authorJerin Jacob <jerin.jacob@caviumnetworks.com>
Tue, 2 Oct 2018 10:51:41 +0000 (16:21 +0530)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 11 Oct 2018 16:53:49 +0000 (18:53 +0200)
Added SCTP Rx checksum offload support

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
app/test-pmd/config.c
doc/guides/nics/features.rst
lib/librte_ethdev/rte_ethdev.c
lib/librte_ethdev/rte_ethdev.h

index 1d23a25..d9a6cfd 100644 (file)
@@ -576,6 +576,15 @@ port_offload_cap_display(portid_t port_id)
                        printf("off\n");
        }
 
+       if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_SCTP_CKSUM) {
+               printf("RX SCTP checksum:              ");
+               if (ports[port_id].dev_conf.rxmode.offloads &
+                   DEV_RX_OFFLOAD_SCTP_CKSUM)
+                       printf("on\n");
+               else
+                       printf("off\n");
+       }
+
        if (dev_info.rx_offload_capa & DEV_RX_OFFLOAD_OUTER_IPV4_CKSUM) {
                printf("RX Outer IPv4 checksum:        ");
                if (ports[port_id].dev_conf.rxmode.offloads &
index b085bda..d42489b 100644 (file)
@@ -576,7 +576,7 @@ L4 checksum offload
 
 Supports L4 checksum offload.
 
-* **[uses]     rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_UDP_CKSUM,DEV_RX_OFFLOAD_TCP_CKSUM``.
+* **[uses]     rte_eth_rxconf,rte_eth_rxmode**: ``offloads:DEV_RX_OFFLOAD_UDP_CKSUM,DEV_RX_OFFLOAD_TCP_CKSUM,DEV_RX_OFFLOAD_SCTP_CKSUM``.
 * **[uses]     rte_eth_txconf,rte_eth_txmode**: ``offloads:DEV_TX_OFFLOAD_UDP_CKSUM,DEV_TX_OFFLOAD_TCP_CKSUM,DEV_TX_OFFLOAD_SCTP_CKSUM``.
 * **[uses]     mbuf**: ``mbuf.ol_flags:PKT_TX_IPV4`` | ``PKT_TX_IPV6``,
   ``mbuf.ol_flags:PKT_TX_L4_NO_CKSUM`` | ``PKT_TX_TCP_CKSUM`` |
@@ -584,7 +584,7 @@ Supports L4 checksum offload.
 * **[provides] mbuf**: ``mbuf.ol_flags:PKT_RX_L4_CKSUM_UNKNOWN`` |
   ``PKT_RX_L4_CKSUM_BAD`` | ``PKT_RX_L4_CKSUM_GOOD`` |
   ``PKT_RX_L4_CKSUM_NONE``.
-* **[provides] rte_eth_dev_info**: ``rx_offload_capa,rx_queue_offload_capa:DEV_RX_OFFLOAD_UDP_CKSUM,DEV_RX_OFFLOAD_TCP_CKSUM``,
+* **[provides] rte_eth_dev_info**: ``rx_offload_capa,rx_queue_offload_capa:DEV_RX_OFFLOAD_UDP_CKSUM,DEV_RX_OFFLOAD_TCP_CKSUM,DEV_RX_OFFLOAD_SCTP_CKSUM``,
   ``tx_offload_capa,tx_queue_offload_capa:DEV_TX_OFFLOAD_UDP_CKSUM,DEV_TX_OFFLOAD_TCP_CKSUM,DEV_TX_OFFLOAD_SCTP_CKSUM``.
 
 .. _nic_features_hw_timestamp:
index 4930eb6..2759fe8 100644 (file)
@@ -126,6 +126,7 @@ static const struct {
        RTE_RX_OFFLOAD_BIT2STR(TIMESTAMP),
        RTE_RX_OFFLOAD_BIT2STR(SECURITY),
        RTE_RX_OFFLOAD_BIT2STR(KEEP_CRC),
+       RTE_RX_OFFLOAD_BIT2STR(SCTP_CKSUM),
 };
 
 #undef RTE_RX_OFFLOAD_BIT2STR
index f9366f3..3452b60 100644 (file)
@@ -888,6 +888,7 @@ struct rte_eth_conf {
 #define DEV_RX_OFFLOAD_TIMESTAMP       0x00004000
 #define DEV_RX_OFFLOAD_SECURITY         0x00008000
 #define DEV_RX_OFFLOAD_KEEP_CRC                0x00010000
+#define DEV_RX_OFFLOAD_SCTP_CKSUM      0x00020000
 
 #define DEV_RX_OFFLOAD_CHECKSUM (DEV_RX_OFFLOAD_IPV4_CKSUM | \
                                 DEV_RX_OFFLOAD_UDP_CKSUM | \