Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
net/hns3: reimplement hash flow function
[ upstream commit e3069658da9ffb6f83a0d972ff2776c405eb6a8f ] Currently, hns3 driver supports setting multiple rte flow RSS rule, but only the last is valid. This implementation is different from the mainstream usage of rte flow hash in the community. Please see the discussion threads [1] and [2]. This patch sets RSS hash feature completely based on the request of the flow rule so that multiple hash rules can take effect at the same time. Please notice that: 1. For hns3, 'func' has only one hardware. 'key' and 'queue' have only one entry in hardware. 2. the overlapping part of the old rule will be overridden if the configuration items of a new rule overlap with those of an old rule. The hns3_flow_validate() verifies and parses RSS or Fdir rules from user, and saves them to a local variable at the same time. The local variable is directly used to create RSS or Fdir rules. In this way, we save one parsing and saving process. [1] https://lore.kernel.org/all/DM5PR12MB46648085D7CABF1AFF2D75CDD60A9@DM5PR12MB4664.namprd12.prod.outlook.com/ [2] https://lore.kernel.org/all/f7de4db4-1b88-622f-4e03-acd3eee8a72c@oktetlabs.ru/ Fixes: c37ca66 ("net/hns3: support RSS") Signed-off-by: Huisong Li <lihuisong@huawei.com> Signed-off-by: Dongdong Liu <liudongdong3@huawei.com>
- Loading branch information