[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <201812020022.kIa1luV3%fengguang.wu@intel.com>
Date: Sun, 2 Dec 2018 00:19:29 +0800
From: kbuild test robot <lkp@...el.com>
To: Pablo Neira Ayuso <pablo@...filter.org>
Cc: kbuild-all@...org, netdev@...r.kernel.org, davem@...emloft.net,
thomas.lendacky@....com, f.fainelli@...il.com,
ariel.elior@...ium.com, michael.chan@...adcom.com,
santosh@...lsio.com, madalin.bucur@....com,
yisen.zhuang@...wei.com, salil.mehta@...wei.com,
jeffrey.t.kirsher@...el.com, tariqt@...lanox.com,
saeedm@...lanox.com, jiri@...lanox.com, idosch@...lanox.com,
jakub.kicinski@...ronome.com, peppe.cavallaro@...com,
grygorii.strashko@...com, andrew@...n.ch,
vivien.didelot@...oirfairelinux.com, alexandre.torgue@...com,
joabreu@...opsys.com, linux-net-drivers@...arflare.com,
ganeshgr@...lsio.com, ogerlitz@...lanox.com,
Manish.Chopra@...ium.com, marcelo.leitner@...il.com
Subject: Re: [PATCH net-next,v4 12/12] qede: use ethtool_rx_flow_rule() to
remove duplicated parser code
Hi Pablo,
I love your patch! Perhaps something to improve:
[auto build test WARNING on net-next/master]
[also build test WARNING on next-20181130]
[cannot apply to v4.20-rc4]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Pablo-Neira-Ayuso/add-flow_rule-infrastructure/20181130-204709
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64
All warnings (new ones prefixed by >>):
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
drivers/scsi/libfc/fc_libfc.c:209:26: warning: cast to restricted __be16
drivers/scsi/libfc/fc_libfc.c:209:26: warning: cast to restricted __be16
drivers/scsi/libfc/fc_libfc.c:209:26: warning: cast to restricted __be16
drivers/scsi/libfc/fc_libfc.c:209:26: warning: cast to restricted __be16
drivers/scsi/libfc/fc_libfc.c:209:24: warning: incorrect type in assignment (different base types)
drivers/scsi/libfc/fc_libfc.c:209:24: expected restricted __be16 [usertype] fh_seq_cnt
drivers/scsi/libfc/fc_libfc.c:209:24: got int
drivers/scsi/libfc/fc_libfc.c:299:17: error: incompatible types in comparison expression (different address spaces)
drivers/scsi/libfc/fc_libfc.c:301:17: error: incompatible types in comparison expression (different address spaces)
drivers/net/wireless/intel/iwlwifi/fw/file.h:287:19: warning: mixed bitwiseness
drivers/net/wireless/intel/iwlwifi/fw/file.h:413:19: warning: mixed bitwiseness
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
drivers/staging/android/ion/ion_carveout_heap.c:106:17: warning: symbol 'ion_carveout_heap_create' was not declared. Should it be static?
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
drivers/net/wireless/ath/ath9k/eeprom_def.c:138:9: warning: cast to restricted __le16
drivers/net/wireless/ath/ath9k/eeprom_def.c:138:9: warning: cast from restricted __le32
drivers/net/wireless/ath/ath9k/eeprom_def.c:139:9: warning: cast to restricted __le16
drivers/net/wireless/ath/ath9k/eeprom_def.c:139:9: warning: cast from restricted __le32
drivers/net/wireless/ath/ath9k/eeprom_def.c:140:9: warning: cast to restricted __le16
drivers/net/wireless/ath/ath9k/eeprom_def.c:140:9: warning: cast from restricted __le32
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
drivers/staging/android/ion/ion_chunk_heap.c:111:17: warning: symbol 'ion_chunk_heap_create' was not declared. Should it be static?
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
drivers/net/wireless/marvell/mwifiex/sta_event.c:635:13: warning: restricted __le16 degrades to integer
drivers/net/wireless/marvell/mwifiex/sta_event.c:635:13: warning: cast to restricted __le16
drivers/gpu/drm/nouveau/nvkm/engine/fifo/gv100.c:56:1: warning: symbol 'gv100_fifo_runlist' was not declared. Should it be static?
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
drivers/net/wireless/intel/iwlwifi/fw/file.h:287:19: warning: mixed bitwiseness
drivers/net/wireless/intel/iwlwifi/fw/file.h:413:19: warning: mixed bitwiseness
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:4789:17: warning: cast from restricted __le16
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:4862:17: warning: cast from restricted __le16
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
>> drivers/net/ethernet/netronome/nfp/flower/action.c:613:28: warning: mixing different enum types
drivers/net/ethernet/netronome/nfp/flower/action.c:613:28: unsigned int enum flow_action_mangle_base versus
drivers/net/ethernet/netronome/nfp/flower/action.c:613:28: unsigned int enum pedit_header_type
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
drivers/net/wireless/ath/ath9k/eeprom_4k.c:79:9: warning: cast to restricted __le16
drivers/net/wireless/ath/ath9k/eeprom_4k.c:79:9: warning: cast from restricted __le32
drivers/scsi/libfc/fc_exch.c:285:40: warning: mixing different enum types
drivers/scsi/libfc/fc_exch.c:285:40: unsigned int enum fc_class versus
drivers/scsi/libfc/fc_exch.c:285:40: unsigned int enum fc_sof
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
drivers/scsi/libfc/fc_exch.c:820:23: warning: context imbalance in 'fc_exch_em_alloc' - different lock contexts for basic block
drivers/scsi/libfc/fc_exch.c:1031:29: warning: context imbalance in 'fc_exch_resp' - unexpected unlock
drivers/scsi/libfc/fc_exch.c:2224:9: warning: context imbalance in 'fc_exch_seq_send' - unexpected unlock
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
drivers/net/ethernet/intel/igb/igb_ptp.c:1102:17: warning: incorrect type in argument 1 (different base types)
drivers/net/ethernet/intel/igb/igb_ptp.c:1102:17: expected unsigned int [unsigned] val
drivers/net/ethernet/intel/igb/igb_ptp.c:1102:17: got restricted __be16 [usertype] <noident>
drivers/net/ethernet/intel/igb/igb_ptp.c:1107:25: warning: incorrect type in argument 1 (different base types)
drivers/net/ethernet/intel/igb/igb_ptp.c:1107:25: expected unsigned int [unsigned] val
drivers/net/ethernet/intel/igb/igb_ptp.c:1107:25: got restricted __be16 [usertype] <noident>
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c:212:1: error: directive in argument list
drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv04.c:214:1: error: directive in argument list
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
drivers/net/wireless/ath/ath9k/eeprom_9287.c:82:9: warning: cast to restricted __le16
drivers/net/wireless/ath/ath9k/eeprom_9287.c:82:9: warning: cast from restricted __le32
drivers/net/wireless/ath/ath9k/eeprom_9287.c:83:9: warning: cast to restricted __le16
drivers/net/wireless/ath/ath9k/eeprom_9287.c:83:9: warning: cast from restricted __le32
drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c:83:1: error: directive in argument list
drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv10.c:85:1: error: directive in argument list
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c:84:1: error: directive in argument list
drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv17.c:86:1: error: directive in argument list
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c:231:1: error: directive in argument list
drivers/gpu/drm/nouveau/nvkm/engine/fifo/dmanv40.c:233:1: error: directive in argument list
include/linux/slab.h:332:43: warning: dubious: x & !y
drivers/net/wireless/intel/iwlwifi/dvm/..//fw/file.h:287:19: warning: mixed bitwiseness
drivers/net/wireless/intel/iwlwifi/dvm/..//fw/file.h:413:19: warning: mixed bitwiseness
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
include/linux/slab.h:332:43: warning: dubious: x & !y
vim +613 drivers/net/ethernet/netronome/nfp/flower/action.c
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 586
f8b7b0a6 Pieter Jansen van Vuuren 2017-10-06 587 static int
ca04c9e4 Pablo Neira Ayuso 2018-11-29 588 nfp_fl_pedit(const struct flow_action_entry *act,
ca04c9e4 Pablo Neira Ayuso 2018-11-29 589 struct tc_cls_flower_offload *flow,
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 590 char *nfp_action, int *a_len, u32 *csum_updated)
da83d8fe Pieter Jansen van Vuuren 2017-10-06 591 {
012ba7af Pablo Neira Ayuso 2018-11-29 592 struct flow_rule *rule = tc_cls_flower_offload_flow_rule(flow);
354b82bb Pieter Jansen van Vuuren 2017-10-06 593 struct nfp_fl_set_ipv6_addr set_ip6_dst, set_ip6_src;
4234d62c Pieter Jansen van Vuuren 2018-11-06 594 struct nfp_fl_set_ipv6_tc_hl_fl set_ip6_tc_hl_fl;
a3c6b063 Pieter Jansen van Vuuren 2018-11-06 595 struct nfp_fl_set_ip4_ttl_tos set_ip_ttl_tos;
c0b1bd9a Pieter Jansen van Vuuren 2017-10-06 596 struct nfp_fl_set_ip4_addrs set_ip_addr;
f8b7b0a6 Pieter Jansen van Vuuren 2017-10-06 597 struct nfp_fl_set_tport set_tport;
da83d8fe Pieter Jansen van Vuuren 2017-10-06 598 struct nfp_fl_set_eth set_eth;
da83d8fe Pieter Jansen van Vuuren 2017-10-06 599 enum pedit_header_type htype;
d08c9e58 Pieter Jansen van Vuuren 2018-10-15 600 size_t act_size = 0;
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 601 u8 ip_proto = 0;
ca04c9e4 Pablo Neira Ayuso 2018-11-29 602 int idx, err;
ca04c9e4 Pablo Neira Ayuso 2018-11-29 603 u32 offset;
da83d8fe Pieter Jansen van Vuuren 2017-10-06 604
4234d62c Pieter Jansen van Vuuren 2018-11-06 605 memset(&set_ip6_tc_hl_fl, 0, sizeof(set_ip6_tc_hl_fl));
a3c6b063 Pieter Jansen van Vuuren 2018-11-06 606 memset(&set_ip_ttl_tos, 0, sizeof(set_ip_ttl_tos));
354b82bb Pieter Jansen van Vuuren 2017-10-06 607 memset(&set_ip6_dst, 0, sizeof(set_ip6_dst));
354b82bb Pieter Jansen van Vuuren 2017-10-06 608 memset(&set_ip6_src, 0, sizeof(set_ip6_src));
c0b1bd9a Pieter Jansen van Vuuren 2017-10-06 609 memset(&set_ip_addr, 0, sizeof(set_ip_addr));
f8b7b0a6 Pieter Jansen van Vuuren 2017-10-06 610 memset(&set_tport, 0, sizeof(set_tport));
da83d8fe Pieter Jansen van Vuuren 2017-10-06 611 memset(&set_eth, 0, sizeof(set_eth));
da83d8fe Pieter Jansen van Vuuren 2017-10-06 612
ca04c9e4 Pablo Neira Ayuso 2018-11-29 @613 htype = act->mangle.htype;
ca04c9e4 Pablo Neira Ayuso 2018-11-29 614 offset = act->mangle.offset;
da83d8fe Pieter Jansen van Vuuren 2017-10-06 615
da83d8fe Pieter Jansen van Vuuren 2017-10-06 616 switch (htype) {
da83d8fe Pieter Jansen van Vuuren 2017-10-06 617 case TCA_PEDIT_KEY_EX_HDR_TYPE_ETH:
ca04c9e4 Pablo Neira Ayuso 2018-11-29 618 err = nfp_fl_set_eth(act, idx, offset, &set_eth);
da83d8fe Pieter Jansen van Vuuren 2017-10-06 619 break;
c0b1bd9a Pieter Jansen van Vuuren 2017-10-06 620 case TCA_PEDIT_KEY_EX_HDR_TYPE_IP4:
ca04c9e4 Pablo Neira Ayuso 2018-11-29 621 err = nfp_fl_set_ip4(act, idx, offset, &set_ip_addr,
a3c6b063 Pieter Jansen van Vuuren 2018-11-06 622 &set_ip_ttl_tos);
c0b1bd9a Pieter Jansen van Vuuren 2017-10-06 623 break;
354b82bb Pieter Jansen van Vuuren 2017-10-06 624 case TCA_PEDIT_KEY_EX_HDR_TYPE_IP6:
ca04c9e4 Pablo Neira Ayuso 2018-11-29 625 err = nfp_fl_set_ip6(act, idx, offset, &set_ip6_dst,
4234d62c Pieter Jansen van Vuuren 2018-11-06 626 &set_ip6_src, &set_ip6_tc_hl_fl);
354b82bb Pieter Jansen van Vuuren 2017-10-06 627 break;
f8b7b0a6 Pieter Jansen van Vuuren 2017-10-06 628 case TCA_PEDIT_KEY_EX_HDR_TYPE_TCP:
ca04c9e4 Pablo Neira Ayuso 2018-11-29 629 err = nfp_fl_set_tport(act, idx, offset, &set_tport,
f8b7b0a6 Pieter Jansen van Vuuren 2017-10-06 630 NFP_FL_ACTION_OPCODE_SET_TCP);
f8b7b0a6 Pieter Jansen van Vuuren 2017-10-06 631 break;
f8b7b0a6 Pieter Jansen van Vuuren 2017-10-06 632 case TCA_PEDIT_KEY_EX_HDR_TYPE_UDP:
ca04c9e4 Pablo Neira Ayuso 2018-11-29 633 err = nfp_fl_set_tport(act, idx, offset, &set_tport,
f8b7b0a6 Pieter Jansen van Vuuren 2017-10-06 634 NFP_FL_ACTION_OPCODE_SET_UDP);
f8b7b0a6 Pieter Jansen van Vuuren 2017-10-06 635 break;
da83d8fe Pieter Jansen van Vuuren 2017-10-06 636 default:
da83d8fe Pieter Jansen van Vuuren 2017-10-06 637 return -EOPNOTSUPP;
da83d8fe Pieter Jansen van Vuuren 2017-10-06 638 }
da83d8fe Pieter Jansen van Vuuren 2017-10-06 639 if (err)
da83d8fe Pieter Jansen van Vuuren 2017-10-06 640 return err;
da83d8fe Pieter Jansen van Vuuren 2017-10-06 641
012ba7af Pablo Neira Ayuso 2018-11-29 642 if (flow_rule_match_key(rule, FLOW_DISSECTOR_KEY_BASIC)) {
012ba7af Pablo Neira Ayuso 2018-11-29 643 struct flow_match_basic match;
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 644
012ba7af Pablo Neira Ayuso 2018-11-29 645 flow_rule_match_basic(rule, &match);
012ba7af Pablo Neira Ayuso 2018-11-29 646 ip_proto = match.key->ip_proto;
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 647 }
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 648
62d3f60b Pieter Jansen van Vuuren 2017-10-20 649 if (set_eth.head.len_lw) {
da83d8fe Pieter Jansen van Vuuren 2017-10-06 650 act_size = sizeof(set_eth);
da83d8fe Pieter Jansen van Vuuren 2017-10-06 651 memcpy(nfp_action, &set_eth, act_size);
da83d8fe Pieter Jansen van Vuuren 2017-10-06 652 *a_len += act_size;
d08c9e58 Pieter Jansen van Vuuren 2018-10-15 653 }
a3c6b063 Pieter Jansen van Vuuren 2018-11-06 654 if (set_ip_ttl_tos.head.len_lw) {
a3c6b063 Pieter Jansen van Vuuren 2018-11-06 655 nfp_action += act_size;
a3c6b063 Pieter Jansen van Vuuren 2018-11-06 656 act_size = sizeof(set_ip_ttl_tos);
a3c6b063 Pieter Jansen van Vuuren 2018-11-06 657 memcpy(nfp_action, &set_ip_ttl_tos, act_size);
a3c6b063 Pieter Jansen van Vuuren 2018-11-06 658 *a_len += act_size;
a3c6b063 Pieter Jansen van Vuuren 2018-11-06 659
a3c6b063 Pieter Jansen van Vuuren 2018-11-06 660 /* Hardware will automatically fix IPv4 and TCP/UDP checksum. */
a3c6b063 Pieter Jansen van Vuuren 2018-11-06 661 *csum_updated |= TCA_CSUM_UPDATE_FLAG_IPV4HDR |
a3c6b063 Pieter Jansen van Vuuren 2018-11-06 662 nfp_fl_csum_l4_to_flag(ip_proto);
a3c6b063 Pieter Jansen van Vuuren 2018-11-06 663 }
d08c9e58 Pieter Jansen van Vuuren 2018-10-15 664 if (set_ip_addr.head.len_lw) {
d08c9e58 Pieter Jansen van Vuuren 2018-10-15 665 nfp_action += act_size;
c0b1bd9a Pieter Jansen van Vuuren 2017-10-06 666 act_size = sizeof(set_ip_addr);
c0b1bd9a Pieter Jansen van Vuuren 2017-10-06 667 memcpy(nfp_action, &set_ip_addr, act_size);
c0b1bd9a Pieter Jansen van Vuuren 2017-10-06 668 *a_len += act_size;
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 669
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 670 /* Hardware will automatically fix IPv4 and TCP/UDP checksum. */
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 671 *csum_updated |= TCA_CSUM_UPDATE_FLAG_IPV4HDR |
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 672 nfp_fl_csum_l4_to_flag(ip_proto);
d08c9e58 Pieter Jansen van Vuuren 2018-10-15 673 }
4234d62c Pieter Jansen van Vuuren 2018-11-06 674 if (set_ip6_tc_hl_fl.head.len_lw) {
4234d62c Pieter Jansen van Vuuren 2018-11-06 675 nfp_action += act_size;
4234d62c Pieter Jansen van Vuuren 2018-11-06 676 act_size = sizeof(set_ip6_tc_hl_fl);
4234d62c Pieter Jansen van Vuuren 2018-11-06 677 memcpy(nfp_action, &set_ip6_tc_hl_fl, act_size);
4234d62c Pieter Jansen van Vuuren 2018-11-06 678 *a_len += act_size;
4234d62c Pieter Jansen van Vuuren 2018-11-06 679
4234d62c Pieter Jansen van Vuuren 2018-11-06 680 /* Hardware will automatically fix TCP/UDP checksum. */
4234d62c Pieter Jansen van Vuuren 2018-11-06 681 *csum_updated |= nfp_fl_csum_l4_to_flag(ip_proto);
4234d62c Pieter Jansen van Vuuren 2018-11-06 682 }
d08c9e58 Pieter Jansen van Vuuren 2018-10-15 683 if (set_ip6_dst.head.len_lw && set_ip6_src.head.len_lw) {
354b82bb Pieter Jansen van Vuuren 2017-10-06 684 /* TC compiles set src and dst IPv6 address as a single action,
354b82bb Pieter Jansen van Vuuren 2017-10-06 685 * the hardware requires this to be 2 separate actions.
354b82bb Pieter Jansen van Vuuren 2017-10-06 686 */
d08c9e58 Pieter Jansen van Vuuren 2018-10-15 687 nfp_action += act_size;
354b82bb Pieter Jansen van Vuuren 2017-10-06 688 act_size = sizeof(set_ip6_src);
354b82bb Pieter Jansen van Vuuren 2017-10-06 689 memcpy(nfp_action, &set_ip6_src, act_size);
354b82bb Pieter Jansen van Vuuren 2017-10-06 690 *a_len += act_size;
354b82bb Pieter Jansen van Vuuren 2017-10-06 691
354b82bb Pieter Jansen van Vuuren 2017-10-06 692 act_size = sizeof(set_ip6_dst);
354b82bb Pieter Jansen van Vuuren 2017-10-06 693 memcpy(&nfp_action[sizeof(set_ip6_src)], &set_ip6_dst,
354b82bb Pieter Jansen van Vuuren 2017-10-06 694 act_size);
354b82bb Pieter Jansen van Vuuren 2017-10-06 695 *a_len += act_size;
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 696
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 697 /* Hardware will automatically fix TCP/UDP checksum. */
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 698 *csum_updated |= nfp_fl_csum_l4_to_flag(ip_proto);
62d3f60b Pieter Jansen van Vuuren 2017-10-20 699 } else if (set_ip6_dst.head.len_lw) {
d08c9e58 Pieter Jansen van Vuuren 2018-10-15 700 nfp_action += act_size;
354b82bb Pieter Jansen van Vuuren 2017-10-06 701 act_size = sizeof(set_ip6_dst);
354b82bb Pieter Jansen van Vuuren 2017-10-06 702 memcpy(nfp_action, &set_ip6_dst, act_size);
354b82bb Pieter Jansen van Vuuren 2017-10-06 703 *a_len += act_size;
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 704
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 705 /* Hardware will automatically fix TCP/UDP checksum. */
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 706 *csum_updated |= nfp_fl_csum_l4_to_flag(ip_proto);
62d3f60b Pieter Jansen van Vuuren 2017-10-20 707 } else if (set_ip6_src.head.len_lw) {
d08c9e58 Pieter Jansen van Vuuren 2018-10-15 708 nfp_action += act_size;
354b82bb Pieter Jansen van Vuuren 2017-10-06 709 act_size = sizeof(set_ip6_src);
354b82bb Pieter Jansen van Vuuren 2017-10-06 710 memcpy(nfp_action, &set_ip6_src, act_size);
354b82bb Pieter Jansen van Vuuren 2017-10-06 711 *a_len += act_size;
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 712
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 713 /* Hardware will automatically fix TCP/UDP checksum. */
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 714 *csum_updated |= nfp_fl_csum_l4_to_flag(ip_proto);
d08c9e58 Pieter Jansen van Vuuren 2018-10-15 715 }
d08c9e58 Pieter Jansen van Vuuren 2018-10-15 716 if (set_tport.head.len_lw) {
d08c9e58 Pieter Jansen van Vuuren 2018-10-15 717 nfp_action += act_size;
f8b7b0a6 Pieter Jansen van Vuuren 2017-10-06 718 act_size = sizeof(set_tport);
f8b7b0a6 Pieter Jansen van Vuuren 2017-10-06 719 memcpy(nfp_action, &set_tport, act_size);
f8b7b0a6 Pieter Jansen van Vuuren 2017-10-06 720 *a_len += act_size;
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 721
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 722 /* Hardware will automatically fix TCP/UDP checksum. */
ed8f2b52 Pieter Jansen van Vuuren 2018-06-29 723 *csum_updated |= nfp_fl_csum_l4_to_flag(ip_proto);
da83d8fe Pieter Jansen van Vuuren 2017-10-06 724 }
da83d8fe Pieter Jansen van Vuuren 2017-10-06 725
da83d8fe Pieter Jansen van Vuuren 2017-10-06 726 return 0;
da83d8fe Pieter Jansen van Vuuren 2017-10-06 727 }
da83d8fe Pieter Jansen van Vuuren 2017-10-06 728
:::::: The code at line 613 was first introduced by commit
:::::: ca04c9e42b71103c41fbc618e0a9a306344e72fd drivers: net: use flow action infrastructure
:::::: TO: Pablo Neira Ayuso <pablo@...filter.org>
:::::: CC: 0day robot <lkp@...el.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
Download attachment ".config.gz" of type "application/gzip" (66621 bytes)
Powered by blists - more mailing lists