net/liquidio: add API to control Rx
[dpdk.git] / drivers / net / liquidio / base / lio_hw_defs.h
index 4271730..59668c0 100644 (file)
@@ -108,16 +108,34 @@ enum octeon_tag_type {
 
 /* pre-defined host->NIC tag values */
 #define LIO_CONTROL    (0x11111110)
+#define LIO_DATA(i)    (0x11111111 + (i))
 
 /* used for NIC operations */
 #define LIO_OPCODE     1
 
+/* Subcodes are used by host driver/apps to identify the sub-operation
+ * for the core. They only need to by unique for a given subsystem.
+ */
+#define LIO_OPCODE_SUBCODE(op, sub)            \
+               ((((op) & 0x0f) << 8) | ((sub) & 0x7f))
+
 /** LIO_OPCODE subcodes */
 /* This subcode is sent by core PCI driver to indicate cores are ready. */
+#define LIO_OPCODE_NW_DATA             0x02 /* network packet data */
+#define LIO_OPCODE_CMD                 0x03
+#define LIO_OPCODE_INFO                        0x04
 #define LIO_OPCODE_IF_CFG              0x09
 
 #define LIO_MAX_RX_PKTLEN              (64 * 1024)
 
+/* NIC Command types */
+#define LIO_CMD_RX_CTL                 0x4
+
+/* RX(packets coming from wire) Checksum verification flags */
+/* TCP/UDP csum */
+#define LIO_L4_CSUM_VERIFIED           0x1
+#define LIO_IP_CSUM_VERIFIED           0x2
+
 /* Interface flags communicated between host driver and core app. */
 enum lio_ifflags {
        LIO_IFFLAG_UNICAST      = 0x10