mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
net/mlx5: TC, using swap() instead of tmp variable
swap() was used instead of the tmp variable to swap values Signed-off-by: Yihao Han <hanyihao@vivo.com> Reviewed-by: Roi Dayan <roid@nvidia.com> Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
This commit is contained in:
parent
1cfd3490f2
commit
0164a9bd9d
1 changed files with 1 additions and 4 deletions
|
@ -907,12 +907,9 @@ mlx5_tc_ct_shared_counter_get(struct mlx5_tc_ct_priv *ct_priv,
|
|||
struct mlx5_ct_tuple rev_tuple = entry->tuple;
|
||||
struct mlx5_ct_counter *shared_counter;
|
||||
struct mlx5_ct_entry *rev_entry;
|
||||
__be16 tmp_port;
|
||||
|
||||
/* get the reversed tuple */
|
||||
tmp_port = rev_tuple.port.src;
|
||||
rev_tuple.port.src = rev_tuple.port.dst;
|
||||
rev_tuple.port.dst = tmp_port;
|
||||
swap(rev_tuple.port.src, rev_tuple.port.dst);
|
||||
|
||||
if (rev_tuple.addr_type == FLOW_DISSECTOR_KEY_IPV4_ADDRS) {
|
||||
__be32 tmp_addr = rev_tuple.ip.src_v4;
|
||||
|
|
Loading…
Reference in a new issue