Skip to content

Commit

Permalink
Deprecate PF_RING_ZC_PKT_FLAGS_FLOW_OFFLOAD_* flags (Accolade)
Browse files Browse the repository at this point in the history
  • Loading branch information
cardigliano committed Nov 20, 2023
1 parent a298c19 commit 8477906
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
4 changes: 0 additions & 4 deletions kernel/linux/pf_ring.h
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,6 @@ struct pfring_extended_pkthdr {
#define PKT_FLAGS_IP_MORE_FRAG 1 << 2 /* IP More fragments flag set */
#define PKT_FLAGS_IP_FRAG_OFFSET 1 << 3 /* IP fragment offset set (not 0) */
#define PKT_FLAGS_VLAN_HWACCEL 1 << 4 /* VLAN stripped by hw */
#define PKT_FLAGS_FLOW_OFFLOAD_UPDATE 1 << 6 /* Flow update metadata, see generic_flow_update struct (keep flag compatible with ZC) */
#define PKT_FLAGS_FLOW_OFFLOAD_PACKET 1 << 7 /* Flow raw packet, pkt_hash contains the flow_id (keep flag compatible with ZC) */
#define PKT_FLAGS_FLOW_OFFLOAD_MARKER 1 << 8 /* Flow raw packet belongs to a flow that has been marked (keep flag compatible with ZC) */
#define PKT_FLAGS_FLOW_OFFLOAD_1ST 1 << 9 /* Flow raw packet, this is the 1st one (Start of Flow) (keep flag compatible with ZC) */
u_int32_t flags;

u_int8_t rx_direction; /* 1=RX: packet received by the NIC, 0=TX: packet transmitted by the NIC */
Expand Down
1 change: 0 additions & 1 deletion userland/examples/pfcount.c
Original file line number Diff line number Diff line change
Expand Up @@ -1317,7 +1317,6 @@ int main(int argc, char* argv[]) {
if(asymm_rss) flags |= PF_RING_ZC_NOT_REPROGRAM_RSS;
else flags |= PF_RING_ZC_SYMMETRIC_RSS; /* Note that symmetric RSS is ignored by non-ZC drivers */
if(rss_q_0_only) flags |= PF_RING_ZC_NOT_REPROGRAM_RSS | PF_RING_ZC_FIXED_RSS_Q_0;
/* flags |= PF_RING_FLOW_OFFLOAD | PF_RING_FLOW_OFFLOAD_NOUPDATES; to receive FlowID on supported adapters*/
/* flags |= PF_RING_USERSPACE_BPF; to force userspace BPF even with kernel capture */

pd = pfring_open(device, snaplen, flags);
Expand Down
8 changes: 4 additions & 4 deletions userland/lib/pfring_zc.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@
#define PF_RING_ZC_PKT_FLAGS_BAD_L4_CS (1 << 3) /**< pfring_zc_pkt_buff.flags: bad TCP/UDP checksum detected (note: UDP checksum 0 is detected as bad on some cards!) */
//#define PF_RING_ZC_PKT_FLAGS_TX_IP_CS (1 << 4) /**< pfring_zc_pkt_buff.flags: compute IP checksum on transmission (when supported) */
//#define PF_RING_ZC_PKT_FLAGS_TX_L4_CS (1 << 5) /**< pfring_zc_pkt_buff.flags: compute TCP checksum on transmission (when supported) */
#define PF_RING_ZC_PKT_FLAGS_FLOW_OFFLOAD_UPDATE (1 << 6) /**< pfring_zc_pkt_buff.flags: buffer contains flow metadata */
#define PF_RING_ZC_PKT_FLAGS_FLOW_OFFLOAD_PACKET (1 << 7) /**< pfring_zc_pkt_buff.flags: buffer contains a raw packet */
#define PF_RING_ZC_PKT_FLAGS_FLOW_OFFLOAD_MARKER (1 << 8) /**< pfring_zc_pkt_buff.flags: buffer belongs to a flow that has been marked */
#define PF_RING_ZC_PKT_FLAGS_FLOW_OFFLOAD_1ST (1 << 9) /**< pfring_zc_pkt_buff.flags: buffer belongs to a flow and it's the first one (start of flow) */
#define PF_RING_ZC_PKT_FLAGS_FLOW_OFFLOAD_UPDATE (1 << 6) /**< pfring_zc_pkt_buff.flags: Deprecated */
#define PF_RING_ZC_PKT_FLAGS_FLOW_OFFLOAD_PACKET (1 << 7) /**< pfring_zc_pkt_buff.flags: Deprecated */
#define PF_RING_ZC_PKT_FLAGS_FLOW_OFFLOAD_MARKER (1 << 8) /**< pfring_zc_pkt_buff.flags: Deprecated */
#define PF_RING_ZC_PKT_FLAGS_FLOW_OFFLOAD_1ST (1 << 9) /**< pfring_zc_pkt_buff.flags: Deprecated */

#define PF_RING_ZC_BUILTIN_GTP_HASH_FLAGS_V1 (1 << 0) /**< pfring_zc_builtin_gtp_hash flags: GTP v1 */
#define PF_RING_ZC_BUILTIN_GTP_HASH_FLAGS_V2 (1 << 1) /**< pfring_zc_builtin_gtp_hash flags: GTP v2 */
Expand Down

0 comments on commit 8477906

Please sign in to comment.