Skip to content

Commit

Permalink
issue: 1521601 Fix user defined flow tag handling
Browse files Browse the repository at this point in the history
Fix is due to CX3 change in VMA.

Signed-off-by: Rafi Wiener <[email protected]>
  • Loading branch information
rafiw authored and liranoz12 committed Oct 31, 2018
1 parent 7ab8f45 commit a477538
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
1 change: 0 additions & 1 deletion src/vma/dev/ring_simple.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ class ring_simple : public ring_slave
virtual int get_tx_channel_fd() const { return m_p_tx_comp_event_channel ? m_p_tx_comp_event_channel->fd : -1; };
struct ibv_comp_channel* get_tx_comp_event_channel() { return m_p_tx_comp_event_channel; }
int get_ring_descriptors(vma_mlx_hw_device_data &data);
void disable_flow_tag() { m_flow_tag_enabled = false; }
friend class cq_mgr;
friend class cq_mgr_mlx5;
friend class qp_mgr;
Expand Down
11 changes: 1 addition & 10 deletions src/vma/sock/sockinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ sockinfo::sockinfo(int fd):
m_flow_tag_enabled(false),
m_n_uc_ttl(safe_mce_sys().sysctl_reader.get_net_ipv4_ttl()),
m_tcp_flow_is_5t(false),
m_p_rings_fds(NULL),
m_user_def_flow_tag(false)
m_p_rings_fds(NULL)

{
m_ring_alloc_logic = ring_allocation_logic_rx(get_fd(), m_ring_alloc_log_rx, this);
Expand Down Expand Up @@ -280,7 +279,6 @@ int sockinfo::setsockopt(int __level, int __optname, const void *__optval, sockl
if (__optval) {
if (__optlen == sizeof(uint32_t)) {
if (set_flow_tag(*(uint32_t*)__optval)) {
m_user_def_flow_tag = true;
si_logdbg("SO_VMA_FLOW_TAG, set "
"socket %s to flow id %d",
m_fd, m_flow_tag_id);
Expand Down Expand Up @@ -619,13 +617,6 @@ bool sockinfo::attach_receiver(flow_tuple_with_local_if &flow_key)
// Attach tuple
BULLSEYE_EXCLUDE_BLOCK_START
unlock_rx_q();
if (m_user_def_flow_tag) {
ring_simple *p_ring = dynamic_cast<ring_simple*>(p_nd_resources->p_ring);
if (p_ring) {
p_ring->disable_flow_tag();
}

}
if (!p_nd_resources->p_ring->attach_flow(flow_key, this)) {
lock_rx_q();
si_logdbg("Failed to attach %s to ring %p", flow_key.to_str(), p_nd_resources->p_ring);
Expand Down
1 change: 0 additions & 1 deletion src/vma/sock/sockinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,6 @@ class sockinfo : public socket_fd_api, public pkt_rcvr_sink, public pkt_sndr_sou
bool m_tcp_flow_is_5t; // to bypass packet analysis

int* m_p_rings_fds;
bool m_user_def_flow_tag;
virtual void set_blocking(bool is_blocked);
virtual int fcntl(int __cmd, unsigned long int __arg);
virtual int ioctl(unsigned long int __request, unsigned long int __arg);
Expand Down

0 comments on commit a477538

Please sign in to comment.