Skip to content

Commit

Permalink
net/ionic: fix Rx filter save
Browse files Browse the repository at this point in the history
[ upstream commit 5ab2983 ]

Check the match variable after copying cmd info, or else there can
be unexpected results.

Fixes: a27e0e9 ("net/ionic: observe endianness in Rx filter")

Signed-off-by: Andrew Boyer <andrew.boyer@amd.com>
  • Loading branch information
andrewb24 authored and kevintraynor committed Nov 7, 2022
1 parent 1bd9b20 commit 3d2c9fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ionic/ionic_rx_filter.c
Expand Up @@ -63,8 +63,8 @@ ionic_rx_filter_save(struct ionic_lif *lif, uint32_t flow_id,
f->flow_id = flow_id;
f->filter_id = rte_le_to_cpu_32(ctx->comp.rx_filter_add.filter_id);
f->rxq_index = rxq_index;
f->match = rte_le_to_cpu_16(f->cmd.match);
memcpy(&f->cmd, &ctx->cmd, sizeof(f->cmd));
f->match = rte_le_to_cpu_16(f->cmd.match);

switch (f->match) {
case IONIC_RX_FILTER_MATCH_VLAN:
Expand Down

0 comments on commit 3d2c9fd

Please sign in to comment.