On 11/3/25 10:35 PM, Jason Wang wrote:
> On Tue, Nov 4, 2025 at 6:56 AM Daniel Jurgens <[email protected]> wrote:
>>
>> Add support for IP_USER type rules from ethtool.
>>
>> Example:
>> $ ethtool -U ens9 flow-type ip4 src-ip 192.168.51.101 action -1
>> Added rule with ID 1
>>
>> The example rule will drop packets with the source IP specified.
>>
>> Signed-off-by: Daniel Jurgens <[email protected]>
>> Reviewed-by: Parav Pandit <[email protected]>
>> Reviewed-by: Shahar Shitrit <[email protected]>
>> Reviewed-by: Xuan Zhuo <[email protected]>
>> ---

>>
>> -       memcpy(eth_m, &fs->m_u.ether_spec, sizeof(*eth_m));
>> -       memcpy(eth_k, &fs->h_u.ether_spec, sizeof(*eth_k));
>> +       if (num_hdrs > 1) {
>> +               eth_m->h_proto = cpu_to_be16(0xffff);
>> +               eth_k->h_proto = cpu_to_be16(ETH_P_IP);
> 
> Do we need to check IPV6 here?

That comes in a subsequent patch. None of this is actually reachable
until we set the get operations in the last patch. So I think it's fine.

> 
> Thanks
> 


Reply via email to