-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for direct memif logic #291
Fix for direct memif logic #291
Conversation
2a9afdc
to
86a3c17
Compare
cb47e25
to
5585b65
Compare
Signed-off-by: Mikhail Avramenko <avramenkomihail15@gmail.com>
650f05c
to
f538ce8
Compare
@edwarnicke please, share your thoughts on modifications i made for memif |
if mechanism := memifMech.ToMechanism(conn.GetMechanism()); mechanism != nil { | ||
// Direct memif if applicable | ||
if memifSocketAddDel, ok := load(ctx, true); ok && m.directMemifEnabled { | ||
_, ok := ifindex.Load(ctx, true) | ||
if ok { | ||
if err := del(ctx, conn, m.vppConn, true); err != nil { | ||
_, _ = m.Close(ctx, conn) | ||
return nil, err | ||
} | ||
mechanism.SetSocketFileURL((&url.URL{Scheme: memifMech.SocketFileScheme, Path: memifSocketAddDel.SocketFilename}).String()) | ||
delete(ctx, true) | ||
ifindex.Delete(ctx, true) | ||
return conn, nil | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be suggesting to not add complexity into memif server element and create a separate chain element for directmemif.
I'm fine with these changes if @edwarnicke has no comments on them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also inclined to a new chain element for directmemif ... but if that is not possible, lets at least default the directMemif=false
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, changed default value
Signed-off-by: Mikhail Avramenko <avramenkomihail15@gmail.com>
Signed-off-by: Mikhail Avramenko avramenkomihail15@gmail.com
Description
Refactored memif chain element and made separate element which supports direct memif logic
Issue link
fixes #287
How Has This Been Tested?
Types of changes